Purpose: maintain the same .htaccess file between localhost and production servers. Making changes to one file is better than editing two or more.
Problem: directory for the project at local & production server are different. Therefore, RewriteBase of mod_rewrite needs to be set differently. Eg:
- Local: http://localhost/working/abc.html
- Production: http://example.com/abc.html
Solution/Hack: have this in httpd.conf for the localhost
Leave a Reply