CodeIgniter Forums
How to fix Mod_rewrite error - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20)
+--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23)
+--- Thread: How to fix Mod_rewrite error (/showthread.php?tid=54067)



How to fix Mod_rewrite error - El Forum - 08-21-2012

[eluser]rash[/eluser]
Hi,

Can any one solve this.. my problem is when i write the code for mod_rewrite it says 500 internal server error.

the code is like this:

Options +FollowSymLinks
RewriteEngine on
RewriteCond %{HTTP_HOST} !www.aapkapaper.com$ [NC]
RewriteCond %{HTTP_HOST} ^(www.)?([a-z0-9-]+).aapkapaper.com [NC]
RewriteRule (.*) index.php?topic=%2 [NC,QSA]

after i delete the first line it didn't through the error but the mod rewrite code is not worked...

after delete the code is like this:

RewriteEngine on
RewriteCond %{HTTP_HOST} !www.aapkapaper.com$ [NC]
RewriteCond %{HTTP_HOST} ^(www.)?([a-z0-9-]+).aapkapaper.com [NC]
RewriteRule (.*) index.php?topic=%2 [NC,QSA]

when i click http://www.aapkapaper.com/?test.php like this in browser it shows me a blan page...

can anyone help for this as i am new in this....

thanks