|
-
301 redirect
Hi Guys,
I am facing a problem in redirecting a old url to new url.
For eg.
I want to redirect
http://olddomain.com/ and http://olddomain/(query param)
to
http://www.newdomain.com/ and http://www.newdomain.com/(query param)
So what I was doing
Code:
RewriteCond %{HTTP_HOST} ^.*olddomain.com [NC]
RewriteRule ^(.*)$ http://www.newdomain.com/$1 [R=301,L]
It works for http://olddomain.com and it redirects to http://www.newdomain.com but when there is query string it doesn't take to the right url.
so http://olddomain/(query param) doesn't redirect to http://www.newdomain.com/(query param).I guess there is something with (.*).Do I need to put it at the end as well but not sure where to put.
I am really lost.Please suggest.
Thanks in advance.
Raj
Thread Information
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
|
Bookmarks