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  
 
   
always rewrite www.mysite.com/forum as forum.mysite.com?

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



Joined: 25 Aug 2008
Posts: 3

always rewrite www.mysite.com/forum as forum.mysite.com?Posted: Mon Aug 25, 2008 5:58 am    Post subject: always rewrite www.mysite.com/forum as forum.mysite.com?

Hello,

I found this great site full of great SEO info tonight, and decided I wanted to try and implement one of the mod rewrites on my forum. First, however, the instructions suggested that I be sure to make sure I had some code in my .htaccess that would always redirect mysite.com to -www.mysite.com. Well, the code went perfectly...but it also got me thinking. I have a subdomain set up with my host (through the cpanel) so that everything at -www.mysite.com/forum can also be reached from forum.mysite.com. Well, after realizing that those duplicates from mysite.com could hurt my page rankings by doubling the content of -www.mysite.com, I also realized that I need to find a way to make -www.mysite.com/forum always rewrite to forum.mysite.com.

How do I do this?
Back to top
dcz
Administrateur - Site Admin
Administrateur - Site Admin


Joined: 28 Apr 2006
Posts: 15131

always rewrite www.mysite.com/forum as forum.mysite.com?Posted: Wed Aug 27, 2008 1:52 pm    Post subject: Re: always rewrite www.mysite.com/forum as forum.mysite.com?

A sub domain is to be considered the same as a main domain as far as phpBB settings and .htaccess.

So to redirect -www.mysite.com/forum to forum.mysite.com, you'd need to implement the www prefix redirection (method n°2) for the sub domain, something like :

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


I just added the forum path that could be passed from the main domain to filter it properly.

++

_________________
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
finallygreen



Joined: 25 Aug 2008
Posts: 3

always rewrite www.mysite.com/forum as forum.mysite.com?Posted: Wed Aug 27, 2008 2:07 pm    Post subject: Re: always rewrite www.mysite.com/forum as forum.mysite.com?

First, thanks for the response Smile

Second, that didn't quite work.....I tried that and is redirects EVERYTHING to forum.mysite.com......even if i type -www.mysite.com
Back to top
finallygreen



Joined: 25 Aug 2008
Posts: 3

always rewrite www.mysite.com/forum as forum.mysite.com?Posted: Fri Oct 24, 2008 2:15 am    Post subject: Re: always rewrite www.mysite.com/forum as forum.mysite.com?

any chance for some help on this one? I did wait 2 months before asking again Smile
Back to top
dcz
Administrateur - Site Admin
Administrateur - Site Admin


Joined: 28 Apr 2006
Posts: 15131

always rewrite www.mysite.com/forum as forum.mysite.com?Posted: Sun Oct 26, 2008 12:49 pm    Post subject: Re: always rewrite www.mysite.com/forum as forum.mysite.com?

Sorry for the delay Wink

Have you implemented this in the sub domain's root .htaccess, eg in -www.example.com/forum/ ?

_________________
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  » phpBB mod Rewrite
Page 1 of 1

Navigation Similar Topics

Jump to: