Home Redirect query string with mod_rewrite (vice versa)
Reply: 0

Redirect query string with mod_rewrite (vice versa)

user494
1#
user494 Published in May 21, 2018, 12:39 pm

Suppose I have URL's with query string, ie: /DesignPatterns

Using mod_rewrite, how can I redirect them to: /index.php?book=DesignPatterns

is it correct the following?

 RewriteCond %{QUERY_STRING} (\w+) 
 RewriteRule ^index.php?book=%1? [L,R=301]

PS: The original question: How can I match query string variables with mod_rewrite? (Feb 12 '10, Patrick McElhaney, I am asking following his permission)

You need to login account before you can post.

About| Privacy statement| Terms of Service| Advertising| Contact us| Help| Sitemap|
Processed in 0.351946 second(s) , Gzip On .

© 2016 Powered by mzan.com design MATCHINFO