| |
| |
|
|
|
|
| |
|
| |
|
| :: |
| Author |
Message |
finallygreen
Joined: 25 Aug 2008 Posts: 3
|
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

Joined: 28 Apr 2006 Posts: 15131
|
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 |
|
 |
finallygreen
Joined: 25 Aug 2008 Posts: 3
|
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
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
|
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  |
|
|
| Back to top |
|
 |
dcz Administrateur - Site Admin

Joined: 28 Apr 2006 Posts: 15131
|
|
| Back to top |
|
 |
|
|
| Navigation |
Similar Topics |
|
|
|
|
|
|
|
| |
|
|
|
|
| |
|
|
|
|
| |