Web Development Blog

GoDaddy Mod_Rewrite Problem


GoDaddy did an upgrade on the hosting server to Apache 2.2. Result - mod_rewrite stopped working.

Here is the solution to that...


Problem was in that line:

rewriterule ^products/([0-9]+)/([A-Za-z0-9_\-\|]+) /products.php?%{QUERY_STRING}[L]

As you can see rewrite path begins with the same name as the file it redirects to, simply changing the file name to product.php fixed the problem. Here is the code that works:

rewriterule ^products/([0-9]+)/([A-Za-z0-9_\-\|]+) /product.php?%{QUERY_STRING}[L]

Other servers are fine with it, but GoDaddy does not like it.

Here is the article about What is Mod Rewrite and How to Use It

Associated tags:  Mod Rewite, Apache, Godaddy, Mod_Rewrite

Add Comment: