Hello,
I have a development box which contains my site in:
http://localhost/dev/
My production environment is just:
http://mydomain.com/
I have all my PHP scripts adjusting to different paths automatically, but everytime I upload changes to my .htaccess file, I need to manually change any mentions of my http_root directory "/dev/" to "/".
How can I automatically compensate for the changing root directory? I've looked through the apache docs but can't seem to get anything to work.
A couple examples of rewrites:
#Rewrite Index Requests
RewriteRule ^index\.(php|htm|html|asp|aspx|cfm|shtml|shtm)/?$ /dev/ [R=301,NC,L]
RewriteRule ^home\.(php|htm|html|asp|aspx|cfm|shtml|shtm)/?$ /dev/ [R=301,NC,L]
#Rewrite contact page requests
RewriteRule ^(.*)contact\.php/?$ /dev/Contact-Page [R,NC,L]
RewriteRule ^Contact-Page/?$ contactpage\.php [NC,L]
Thanks in advance.