check symbol: question mark
2 posts
• Page 1 of 1
check symbol: question mark
Hi All,
I want to set up the rule for removing the question mark.
For example:
http://www.testing.com/shop.aspx?query=abc => http://www.testing.com/shop/query=abc
syntax:
RewriteRule ^shop.aspx\?(.*) /shop/$1 [NC,L,R=301,O]
but it doesn't work.
Is there anyone can help me?
Thanks a lot!
I want to set up the rule for removing the question mark.
For example:
http://www.testing.com/shop.aspx?query=abc => http://www.testing.com/shop/query=abc
syntax:
RewriteRule ^shop.aspx\?(.*) /shop/$1 [NC,L,R=301,O]
but it doesn't work.
Is there anyone can help me?
Thanks a lot!
- HeliconAndrew
-
- Posts: 1264
- Joined: 07 Mar 2012, 10:16
Re: check symbol: question mark
Hello,
Since everything after '?' is considered as a querystring, we suggest you try the following syntax:
The syntax you tried to use suits ISAPI_Rewrite 2, not 3.
Regards
Andrew
Since everything after '?' is considered as a querystring, we suggest you try the following syntax:
- Code: Select all
Rewriteengine on
RewriteBase /
RewriteCond %{QUERY_STRING} ^(.+)$
RewriteRule ^shop\.aspx$ /shop/%1 [NC,L,R=301]
The syntax you tried to use suits ISAPI_Rewrite 2, not 3.
Regards
Andrew
2 posts
• Page 1 of 1
Who is online
Users browsing this forum: No registered users and 14 guests