Quantcast
Channel: .htaccess – w3toppers.com
Viewing all articles
Browse latest Browse all 10

.htaccess rewrite URL with a question mark “?”

$
0
0

You need to use %{QUERY_STRING} to capture the query string data:

RewriteCond %{QUERY_STRING} ^view=(.*)$
RewriteRule ^component/users/?$ %1.html? [R=301,L]

The above rule/condition will take the value of the query string view and use it to form your redirect if the path component/users matches.


Viewing all articles
Browse latest Browse all 10

Trending Articles