Click here to Skip to main content
15,915,019 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi!

1. I want to make an redirect from url like:

localhost/xxx/page.php?value=somestring


to

localhost/xxx/page/somestring


I already made it with that:

RewriteEngine On 
RewriteRule ^color/([^/]*)$ /xxx/page.php?value=$1 [L]


But there is one thing. It would not redirect me to
localhost/xxx/page/somestring
when I manually write old url with parameters, like this:
localhost/xxx/page.php?value=somestring
.

How can I do that?

2. The second thing is that, my parameter sometimes could begin with # sign, which is converted to %23. How can I cut that "%23%" from the beggining? Want to do more friendly URL for SEO, you know. And redirect it too, like in first question.

What I have tried:

RewriteEngine On 
RewriteRule ^color/([^/]*)$ /xxx/page.php?value=$1 [L]


As i wrote, it works, but not redirecting.
Posted

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900