Forum Moderators: phranque
What I meant to say is:
when i click the link
http://www.example.com/page-nine
will open the content of page
http://www.example.com/index.php?page=nine
but the address bar is displayed with the address of
http://www.example.com/index.php?page=nine
instead of the address as
http://www.example.com/page-nine
So is this the problem of the server?
Thanks in advance
Here's the rewrite rule that I used.
RewriteRule ^page-([a-z0-9-]+)/?$ index.php?page=$1 [NC,L]
When I use the same rule in windows based XAMPP and it works fine but when I uploaded it in the server its not changing the address in the address bar.
So I'm confused whether its the problem of the server or not.
I really appreciate your help.
The rule you posted above is correct code to pass client requests for your SEO/friendly URLs to your script.
So, the problem is apparently on your XAMPP development system, and not on the server. A possible cause is another rewriterule that is doing a redirect after this URL is rewritten to the script filepath, or maybe you've got MultiViews enabled on your development system, and it is interfering with mod_rewrite.
Jim