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

Comments (0)

› No comments yet.

Leave a Reply

Allowed Tags - You may use these HTML tags and attributes in your comment.

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>

Pingbacks (0)

› No pingbacks yet.