Forum Moderators: phranque
example_6.com and example_fr.com are parked "to" example.com
if i add an .htaccess file to www.example.com/ consisting of:
RewriteCond %{HTTP_HOST}!^example_fr.com$ [NC]
RewriteRule ^(.*)$ http://example.com/$1 [R=301,L]
RewriteCond %{HTTP_HOST}!^example_6.com$ [NC]
RewriteRule ^(.*)$ http://example.com/$1 [R=301,L]
will it affect the resolution of example.com itself?
i don't want to use index.cgi because it causes the resolution to be in the format http://example.com/index.html, which i don't prefer
does .htaccess slow down server performance?
would any change need to be made to local dns? (i'm not 100% sure what "parked to" means as regards local dns)
finally, will this approach preserve my search site counts while pointing users to the new domain?
thanks in advance for your expertise
- dave
[edited by: jdMorgan at 9:38 pm (utc) on April 18, 2005]
[edit reason] Removed specifics per TOS. [/edit]
Are you asking if you can redirect both domains to example.com using the rules provided?
If you are, you will need to place each rule in it's respective domain .htaccess file, and as long as you are redirecting everything, to an identical directory structure, you could simply use:
RewriteRule ^(.*)$ [example.com...] [R=301,L]
This will move any request to example.com/whatever.
Technically the () are not needed - I use them to keep things straight in my head most of the time.
This will not effect the performance of example.com, because the redirects are being generated to it externally, so the request comes as a full http header.
Yes, excessive .htaccess will slow performance, depending on the structure of your files/directories, you may be able to optimize the regular expression you use to something less cumbersome than (.*), but this single rule should not make a very large or noticable difference in your server performance...
A 301 redirect, will transfer your inbound links... Not sure what you mean by:
finally, will this approach preserve my search site counts while pointing users to the new domain?
Hope this helps.
Justin
let me attempt to interpret your reply
add example_6.com and example_fr.com as virtual domains
then place an .htaccess file for each domain with the code:
RewriteRule ^(.*)$ http://example.com/$1 [R=301,L]
and that will cause example_6.com and example_fr.com to resolve as
http://example.com/
or
http://example.com/index.html
and
the format of example.com itself will not be affected
do i have it right?
thanks for taking the time to respond
- dave
[edited by: jdMorgan at 1:19 am (utc) on April 19, 2005]
[edit reason] Removed specifics, Please see TOS. [/edit]
I thought you currently had two domains you wanted to redirect to a single domain...
Do you have these domains now?
Or, are you wanting to add domains, which use content from a domain you currently have?
Please, be specific in what you are trying to accomplish.
Justin
PS Always use examples rather than actual domains and files, you'll keep the moderators happy ;)
i have two domain names parked to example.com:
example2.com and example3.com
currently both domain names point to the content of example.com
i want them to continue to point to the content of example.com and also resolve to "http://example.com"
example2.com and example3.com have no independent content
thanks -dave
[edited by: jdMorgan at 7:44 pm (utc) on Feb. 11, 2008]
[edit reason] example.com [/edit]