0

So a client of mine has about 150 domain names, all of them he is wanting to redirect to the primary domain name.
I have done something like this for each domain name in the .htaccess file:

Options +FollowSymLinks
RewriteEngine On
RewriteCond %{HTTP_HOST} ^domain12.com$ [NC]
RewriteRule ^(.*)$ http://www.primarydomain.com/$1 [R=301,L]

Options +FollowSymLinks
RewriteEngine On
RewriteCond %{HTTP_HOST} ^www.domain12.com$ [NC]
RewriteRule ^(.*)$ http://www.primarydomain.com/$1 [R=301,L]

Now this works if you are in the root index (home page). As soon as you go to something like www.domain12.com/about then it just loads the page but doesn't redirect the url. Does anyone know what's causing this?

2
Contributors
5
Replies
20
Views
4 Years
Discussion Span
Last Post by AmieCutie
0

@AmieCutie

Now this works if you are in the root index (home page). As soon as you go to something like www.domain12.com/about then it just loads the page but doesn't redirect the url. Does anyone know what's causing this?

Try to used this Mod Rewrite Generator:

http://www.generateit.net/mod-rewrite/

0

Yea, that doesn't help. :(

How does it not work?

You want to redirect this page about to the index

www.domain12.com/about

This is how it should look like:

RewriteCond %{HTTP_HOST} ^.*$
RewriteRule ^about\.html$ "http\:\/\/www\.domain12\.com\/about\.php" [R=301,L]

The Mod Rewrite Generator give you you these codes.

I'm not see the issue you are having? Unless you are not very specific with what you are intending to do.

0

I have the indexes working like this:
www.domain12.com redirects to www.primarydomain.com

I need to redirect stuff like this now:
www.domain12.com/about to www.primarydomain.com/about
www.domain12.com/videos/interview01 to www.primarydomain.com/videos/interview01

Each of the domain names is parked at the primary domain name that my client is using. I did a 301 redirect like in my original posting but it only seems to effect the root/index domain, not the sub-pages and sub-folders.

0

Found the problem! Someone stuffed other .htaccess files into every sub directory. I deleted those and averything works!

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.