Re direct dynamic urls to one static url
2 posts
• Page 1 of 1
Re direct dynamic urls to one static url
Hi, I have many query string urls like this which no longer exists and I need to do a 301 redirect on all the queries to that page, to one static page (my homepage).
The methods I have tried when redirected have left me with the homepage url like this
Is there a way to redirect all the queries to just
http://www.mysite.com
Thanks in advance
All the best
Richard
- Code: Select all
http://www.mysite.com/tips.asp?tip=search-for-freedom
The methods I have tried when redirected have left me with the homepage url like this
- Code: Select all
http://www.mysite.com?tip=search-for-freedom
Is there a way to redirect all the queries to just
http://www.mysite.com
Thanks in advance
All the best
Richard
- HeliconAndrew
- Posts: 1264
- Joined: 07 Mar 2012, 10:16
Re: Re direct dynamic urls to one static url
Hello,
Sure, the rule you have is excellent, because it worked. All you need to do is to tweak it a little.
Lets say you have a rule:
All you need is to add '?' at the end of the destination URL:
Regards
Andrew
Sure, the rule you have is excellent, because it worked. All you need to do is to tweak it a little.
Lets say you have a rule:
- Code: Select all
RewriteCond %{QUERY_STRING} ^tip=([^&]+)$
RewriteRule ^typs\.asp$ / [NC,R=301,L]
All you need is to add '?' at the end of the destination URL:
- Code: Select all
RewriteCond %{QUERY_STRING} ^tip=([^&]+)$
RewriteRule ^typs\.asp$ /? [NC,R=301,L]
Regards
Andrew
2 posts
• Page 1 of 1
Who is online
Users browsing this forum: No registered users and 0 guests