htaccess directives

macro_mote

Verified User
Joined
Apr 26, 2004
Messages
12
When using rewrite rules, I've noticed that if a file or directory does not exist the server ignores what is in the htaccess file and automatically returns a 403. For example, say you want to return a 410 status code so the search engines will immediately drop pages for a certain section from their results. If you completely remove the directory and data, it won't do this but instead returns a 403. The only ways I found to get around this are to use the panel's redirect feature over to another file which has been set to output the proper status code, leave the info in place, or replace the original with some dummy info. All of these IMO are a pretty clumsy way to do this. Also, mod_auth directives seem to take precedence over mod_rewrite ones.

These behaviors are different from what I've experienced using Ensim. On that one, rewrite rules took precedence over error docs and mod_auth. Are these configurable settings which can be changed server-side by the host or will you consider adding this in a future release? Or am I totally missing something on how to get mod_rewrite directives on DA recognized befor it defaults off into an error doc?
 
Hello,

Not too sure about that one. You could try to get your host to change the order in which the mod_auth and mod_rewrite modules are added (AddModule) in the main /etc/httpd/conf/httpd.conf file to see if it makes any difference for you.

John
 
This might help...

This one had me head-scratching for a while. Change the permissions on your public_html directory in the appropriate domain folder to 0755 (enabling public read), and you'll find it magically works. :)

Hope that helps.

Rick.
 
Last edited:
Thank-you very much for your suggestions.

My host doesn't believe me that mod_rewrite isn't fully functioning properly. They would not try your suggestion John as they consider it a custom mod and say they won't deviate from the default install. Rick, you hit the nail on the head. Once I changed perms from 710 to 755, it now works. I didn't notice the system gives public_html more restrictive permissions than the other ones.
 
Back
Top