How do I redirect a link to a particular link using .htaccess
http://www.example.com/one http://differentdomain.co.uk/a/
http://www.example.com/two http://differentdomain.co.uk/b/
http://www.example.com/three http://differentdomain.co.uk/c/
http://www.example.com/four http://differentdomain.co.uk/d/
i have tried Redirect 301 & RewriteRule but its not working at all, im using an apache server
This is what i have on my .htaccess file
<IfModule mod_rewrite.c>
#Options +FollowSymLinks
#Options +Indexes
RewriteEngine On
#RewriteBase /
RewriteCond %{HTTP_HOST} ^www\.example\.com [NC]
RewriteRule ^/one http://differentdomain.co.uk/a/ [R=301,L]
</IfModule>
both these codes dont work for me
Redirect 301 /one/ http://differentdomain.co.uk/a/
RewriteRule ^/one http://differentdomain.co.uk/a/ [R=301,L]
by the way the domain I'm working on is empty only the .htaccess & cgi-bin folder is present
I think (not sure) Redirect
directive doesn't work because you don't have /one
path in your root.
try this :
Options +FollowSymLinks
RewriteEngine On
RewriteRule ^one http://differentdomain.co.uk/a/ [R=301,L]