views:

48

answers:

2
         Options +FollowSymlinks
RewriteEngine on
RewriteRule ^WR-(.*)\.html$ WR.php?act=show

i have created .htaccess file to rewrite WR.php?act=show to .html extension and save this file in a folder where my source file are residing. but it is not working can anybody help me please....

+1  A: 

try this htaccess rule generator
or
this,
these will definitely help you a lot.

Gaurav Sharma
A: 

The rule looks fine to me. Copying and pasting into a .htaccess on my own server redirects WR-foo.html to WR.php?act=show as expected.

Depending on what exactly is happening (are you seeing an error? is it just not redirecting? redirecting to the wrong place? etc), you might want to try enabling logging for mod_rewrite. See the RewriteLog directive (and RewriteLogLevel just below that). The Apache error log is also always worth a look.

Chris Smith
my url is not changing..same url is showing again.
rag
What URL are you trying to access? The rewrite rule won't cause any URLs you enter in your browser to change.What it will do is allow you to request WR-whatever.html and internally Apache will treat it as a rquest to WR.php?act=show.You will still be able to request WR.php?act=show in your browser (and the rewrite rule won't change anything).
Chris Smith