Mod Rewrite Rules Working in .htaccess But Not htconf?

0
49
Asked By Dan On

I have created some rules for Apache and tested them in the .htaccess file and they have worked just fine. I copy them over to the main htconf file and put them inside the correct virtual host like I have done before but these rules aren't being applied.

1 Answer

Answered By Dan On

Make sure there aren't other rules in the .htaccess file that could be overriding it. If you added these new rules to the bottom of the .htaccess file then they will have final priority because they ran last, just like css rules. Rules in the htconf are loaded first and can then be overridden by the rules in the .htaccess file. So if you have something at the start of that .htaccess file, it will cause any of the new rules that you copied to the Apache conf file to stop working.

If you do not need the .htaccess file anymore you can use the AllowOverride None command to disable it.

Related Questions

LEAVE A REPLY

Please enter your comment!
Please enter your name here

This site uses Akismet to reduce spam. Learn how your comment data is processed.