954,587 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

.htaccess Domain Mapping

Hello,

I am trying to map a URL to a sub path using .htaccess.

Does this look right?

//Rewrite to www
Options +FollowSymLinks
RewriteEngine on
RewriteCond %{HTTP_HOST} ^domain.co.uk/sub-path[nc]
RewriteRule ^(.*)$ http://www.domain.co.uk/sub-path/$1 [r=301,nc]

//301 Redirect Old File
Redirect 301 www.anotherdomain.co.uk www.domain.co.uk/sub-path

//301 Redirect Entire Directory
RedirectMatch 301 www.anotherdomain.co.uk(.* ) www.domain.co.uk/sub-path/$1

Many thanks!

bjc999
Newbie Poster
17 posts since Jan 2010
Reputation Points: 10
Solved Threads: 0
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You
View similar articles that have also been tagged: