PDA

View Full Version : Apache & .htaccess


01482
08-26-2005, 10:38 AM
I have root access to my server, would it be a better idea to place my mod_rewrite info into my httpd.conf file? Would it make it more secure?

I know I would have to do this...


<IfModule mod_rewrite.c>
#Rules
</IfModule>


Something similar to that anyways.

darksidepuffin
09-06-2005, 05:30 AM
No. Mod Rewrite rules should be used in .htaccess -- as this is where they belong. Unless you have a specific reason for using them in httpd.conf, it is quite pointless to do so -- and makes updating them a task in itself in that you can no longer simply re-upload .htaccess to update them.

01482
09-06-2005, 06:02 AM
True, thanks for that.

I suppose in httpd you would have to upload the file again then restart the service.

darksidepuffin
09-06-2005, 11:17 AM
True, thanks for that.

I suppose in httpd you would have to upload the file again then restart the service.

No...not really....the quickest way would be shelling into root and editing it....but thats still more roundabout..you'd have to find the virualhost line every time..y'know...theres no point in putting anything in httpd.conf that isn't global..or that can be set elsewhere.