Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>After many times trying, as much as reconfiguring the entire virtual host setup on my mac, I realized that it was a very simple error once I realized it, and it had nothing at all to do with my <code>.htaccess</code> file.</p> <p>My file name was <code>index.php</code> and my rewrite was <code>RewriteRule ^index/([a-zA-Z0-9_-]+)/ index.php?id=$1 [NC,L]</code> and for some reason, it will not let me use <code>^index</code> if there is a file called <code>index.php</code>. I can name <code>^index</code> to <code>^page</code> or <code>^blue</code> or anything else but not <code>^index</code> and it will work fine.</p> <p>What I realized was that my <code>/index.php</code> page can be loaded simply by typing <code>/index</code>. And therefore, was not actually a redirect, it was the stand alone page.</p> <p>In order to fix this I had to add a few lines of code to my <code>vhost.conf</code> or my <code>user.conf</code> file under <code>&lt;Directory "/Users/User/Sites"&gt;</code> file using the terminal.</p> <pre><code>sudo nano /private/etc/apache2/extra/httpd-vhosts.conf </code></pre> <p>and in this, the code I had to removed <code>MultiViews</code> from the options.</p> <pre><code>&lt;Directory "/Users/User/Sites"&gt; Options Indexes FollowSymLinks SymLinksifOwnerMatch MultiViews AllowOverride All Order allow,deny Allow from all &lt;/Directory&gt; </code></pre> <p>so it now looks like this</p> <pre><code>&lt;Directory "/Users/User/Sites"&gt; Options Indexes FollowSymLinks SymLinksifOwnerMatch AllowOverride All Order allow,deny Allow from all &lt;/Directory&gt; </code></pre> <p>Once I did so, <code>/index.php</code> page can no longer be loaded by typing <code>/index</code>. And therefore, I could use the code I originally used in my .htaccess file. And all is solved in paradise. It took a lot of very hard digging and one major headache.</p> <p>Thanks for your help guys.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload