Having trouble with .htaccess URL rewrite

May 2, 2016 1.8k views
LAMP Stack Apache

Hi, I’m having trouble with .htaccess /rewriting URLs.

I followed the tutorial here to install phpmyadmin and along with it installed htaccess, seems to be working for phpmyadmin section:

Then I used this guide to install multiple domains :

I don’t have the domains actually setup yet but I edited my host file so I could see the domain that way. I tried putting up .htaccess files like I had in the phpmyadmin files but they don’t seem to be working.

Example :

order deny,allow
deny from all
allow from 111.111.111
RewriteEngine on

Tried others rewrites and they didn’t seem like they worked. Does not having it setup on an actual domain affect the rewrites?

1 Answer

Look at your vhost config for AllowOverride None, and change it to AllowOverride All

restart apache2/httpd, and you should be good to go.

Have another answer? Share your knowledge.