Forum Moderators: phranque

Message Too Old, No Replies

How do I move Mod_Rewrite from .htaccess to httpd.conf?

         

erikcw

6:33 pm on Sep 4, 2004 (gmt 0)

10+ Year Member



Hi,

I have a virtual host on my server that has some regex stuff in the .htaccess file. I'd like to move it into the httpd.conf file so that users cannot delete/modify it.


Options +FollowSymLinks
RewriteEngine on
RewriteBase /
RewriteRule resources\/index\.html$ /resources/index\.php?sm=1
RewriteRule resources\/$ /resources/index\.php?sm=1
RewriteRule resources\/info\/(.*)\.html$ /resources/index\.php?kw=$1
RewriteRule resources\/index(.*)\.html$ /resources/index\.php?index=$1

What is the correct format from this regex from my .htaccess file to be placed in my httpd.conf file (and where does it go? this is only for one of the virtual hosts).

Also, for security I would like to place the /resource/ directory out of their document root (or make it not accessible (read/write/exe) - what is the best way to do this?

Thanks!
Erik

erikcw

5:50 pm on Sep 6, 2004 (gmt 0)

10+ Year Member



Any ideas? These clients are clamoring for access to this account - but I can't let them in unless these files are "secured" - it is part of the agreement...

Also, since the host is a virtual host on my server, I don't want this rewrite affecting every account, just that one. So the path is /home/user/public_html/... (if that makes a difference)

Thanks! Erik