phpBB SEO
Boards
Directory  
SEO  
Downloads
  phpBB SEO : Search Engine Optimization, Directory, Forums  
Index
Forums
Annuaire
Référencement
Télécharger
 
  Search Rechercher
    Register
Username :  Password :  Log me on automatically each visit  
S'enregistrer  
 
   
Rewrite instead of Redirect

 
Post new topic   Reply to topic    phpBB SEO » SEO Forum  » Apache mod Rewrite
::  
Author Message
daygo140



Joined: 05 Mar 2007
Posts: 3

Rewrite instead of RedirectPosted: Mon Mar 05, 2007 7:41 pm    Post subject: Rewrite instead of Redirect

I have three domains. Problem is I got dellarte.us first and would like the other two dellarte.net and dellartepc.com to redirect to dellarte.us I want them all to display dellartepc.com.

How?

All help is greatly appreciated!
Back to top
dcz
Administrateur - Site Admin
Administrateur - Site Admin


Joined: 28 Apr 2006
Posts: 14279

Rewrite instead of RedirectPosted: Mon Mar 05, 2007 10:34 pm    Post subject: Re: Rewrite instead of Redirect

And welcome Very Happy

This is easily doable thanks to the www prefix redirection, method number 2.

The principle will be to have all the domains you want linked where dellarte.us is already installed, so that all of them are in the end linked to same site.

Then, if I understand well, you'd like all these to be redirected to the .com, to do this, the following rewriterule should do it :

Code:
RewriteCond %{HTTP_HOST} !^www\.dellartepc\.com$ [NC]
RewriteRule ^(.*) http://www.dellartepc.com/$1 [QSA,L,R=301]


in case you want to keep, and thus force, the www prefix or :

Code:
RewriteCond %{HTTP_HOST} !^dellartepc\.com$ [NC]
RewriteRule ^(.*) http://dellartepc.com/$1 [QSA,L,R=301]


in case you prefer not to.

This way you'll take car of two things at a time, the www prefix, and all the other domains that will be installed where dellartepc.com is installed will be http 301 redirected, keeping the uri as it should, eg :

whatever_domain_linked_to_this_host.com/folder/page.html will be http 301 redirected to dellartepc.com/folder/page.html (www.dellartepc.com/folder/page.html in case you want to keep the www prefix).

This requires the use of the Apache mod_rewrite module, reading the www topic thread can help out to make up your mind about keeping or not the www prefix, feel free to ask for help while implementing Wink

++

_________________
Useful links :
SEO Forum || SEO Directory || SEO phpBB || SEO phpBB3 || Search
____________________

Liens Utiles :
Forum référencement || Annuaire référencement || Référencement phpBB || Référencement phpBB3 || Recherche
Back to top
Visit poster's website
daygo140



Joined: 05 Mar 2007
Posts: 3

Rewrite instead of RedirectPosted: Mon Mar 05, 2007 11:16 pm    Post subject: Re: Rewrite instead of Redirect

Ok I want the www to show with dellartepc.com > www.dellartepc.com , in the address bar for all below.

Here's my layout...

My Root is:

dellarte.us (all the files located here)

Then I have add-on's:

dellartepc.com (empty with a redirect to dellarte.us)
dellarte.net (empty with a redirect to dellarte.us)

In which htaccess' do I put the:

Code:
RewriteEngine on
RewriteCond %{HTTP_HOST} !^www\.dellartepc\.com$ [NC]
RewriteRule ^(.*) http://www.dellartepc.com/$1 [QSA,L,R=301]
??
Back to top
dcz
Administrateur - Site Admin
Administrateur - Site Admin


Joined: 28 Apr 2006
Posts: 14279

Rewrite instead of RedirectPosted: Mon Mar 05, 2007 11:54 pm    Post subject: Re: Rewrite instead of Redirect

Actually, if all these are linked to a separate host, you have to implement the code you mentioned in all of them.

The most obvious setting would be to set dellartepc.com and dellarte.net's dns to be linked to dellarte.us host, and to install them on the dellarte.us's host.

It's usually cheaper as well as you do not need to rent storage for the unused domains, but you can as well install the rewriterule in all of them, the result will be the same.

++

_________________
Useful links :
SEO Forum || SEO Directory || SEO phpBB || SEO phpBB3 || Search
____________________

Liens Utiles :
Forum référencement || Annuaire référencement || Référencement phpBB || Référencement phpBB3 || Recherche
Back to top
Visit poster's website
daygo140



Joined: 05 Mar 2007
Posts: 3

Rewrite instead of RedirectPosted: Tue Mar 06, 2007 3:26 am    Post subject: Re: Rewrite instead of Redirect

They are all the same host AND same account. The main is dellarte.us and the add-ons are dellartepc.com and dellarte.net.

I AM A BIG n00b (rookie). So all this rewrite stuff is like a foreign language. Can you give me step by step instructions for each domain? I fooled around a bit and was unsuccessful.

The main thing I am trying to do is get www.dellartepc.com in the address bar for all of these domains. The actual files for dellarte.us is stored at dellarte.us's root. dellartepc.com and dellarte.net are both empty with the exception of an index.html file redirecting to dellarte.us.
Back to top
dcz
Administrateur - Site Admin
Administrateur - Site Admin


Joined: 28 Apr 2006
Posts: 14279

Rewrite instead of RedirectPosted: Tue Mar 06, 2007 10:24 am    Post subject: Re: Rewrite instead of Redirect

Well, I told you all already.

The best is to install all the domains where delarte.us is installed, the same folder, not only the same server. And this mostly depends on your hosting, they must provide some documentation about how to do this.

And to implement the rewriterule I suggested. I cannot check as none is online or accessible at the moment.

In case you want to keep a separate folder for each's root, you'll have to use the same exact set of rewriterule in all the domain's root folder.

This requires to be hosted on Apache running mod_rewrite.

++

_________________
Useful links :
SEO Forum || SEO Directory || SEO phpBB || SEO phpBB3 || Search
____________________

Liens Utiles :
Forum référencement || Annuaire référencement || Référencement phpBB || Référencement phpBB3 || Recherche
Back to top
Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    phpBB SEO » SEO Forum  » Apache mod Rewrite
Page 1 of 1

Navigation Similar Topics

Jump to: