Hi Everyone,
I have a requirement where i need to redirect URLS from one domain(www.example.com) to another domain(www.example1.com)
the script written is as follows,
RewriteEngine On
RewriteCond %{HTTP_HOST} ^example\.com [NC]
RewriteCond %{REQUEST_URI} !^/$ [NC]
RewriteCond %{REQUEST_URI} !^/ab/new/home$ [NC]
RewriteCond %{REQUEST_URI} ^/ab/new/* [NC]
RewriteRule (.*) http:
//example1.com$1 [L,R=301]
By putting this script, whenever i hit a URL with http://example.com/ab/new/former .. etc the URL is getting redirected to
https://example1.com/ab/new/former
instead of http:
//example1.com/ab/new/former
However when i put the rule as (please see the additional slash(/))
RewriteRule (.*) http:
//example1.com
/$1 [L,R=301]
the URL is getting redirected to http:
//example1.com//ab/new/former
[edited by: incrediBILL at 7:19 am (utc) on Aug 27, 2012]
[edit reason] unlinked URLs [/edit]