Problem w/ .htaccess and mod_rewrite

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


Posted

in

by

Tags:

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *