| |
| |
|
|
|
|
| |
|
| |
|
| :: |
| Author |
Message |
Snk
Joined: 08 Nov 2006 Posts: 4
|
Posted: Wed Nov 08, 2006 10:00 am Post subject: multiple rewrite |
|
|
Hi, I've a question about 2 subdomains where are there installed 2 phpbb
support.domain.com
friends.domain.com
I've put the .htaccess on a support folder like /../domain/public_html/support/
with that code:
| Code: |
Options +FollowSymlinks
RewriteEngine On
RewriteBase /
#########################################################
# supporto SEO REWRITE RULES #
#########################################################
# AUTHOR : DCZ http://www.supporto-seo.com/
# STARTED : 01/2006
#####################################################
# FORUMS PAGES
########################
# FORUM PROTECTION RULE
RewriteRule ^.+/([^/]+\.html)$ /index.php [R=301,L]
# CATEGORIES
RewriteRule ^.+-vc([0-9]+)\.html$ /index.php?c=$1 [QSA,L]
# PAGINATED FORUM
RewriteRule ^.+-vf([0-9]+)-([0-9]+)\.html$ /viewforum.php?f=$1&start=$2 [QSA,L]
# FORUM
RewriteRule ^.+-vf([0-9]+)\.html$ /viewforum.php?f=$1 [QSA,L]
# PAGINATED TOPIC
RewriteRule ^.+-vt([0-9]+)-([0-9]+)\.html$ /viewtopic.php?t=$1&start=$2 [QSA,L]
# TOPIC
RewriteRule ^.+-vt([0-9]+)\.html$ /viewtopic.php?t=$1 [QSA,L]
# POST
RewriteRule ^post([0-9]+)\.html$ /viewtopic.php?p=$1 [QSA,L]
#PROFILES
RewriteRule ^member([0-9]+)\.html$ /profile.php?mode=viewprofile&u=$1 [QSA,L]
# END supporto PAGES
#####################################################
|
and alla works perfectly.
It's the first time that I install modrewrite on subdomain an I've put the file on /support/ folder like "root" without any /namefolder/ redirections on .htaccess file.
I've a question, if I create another subdomine like friends.domain.com in a folder path like /../domain/public_html/friends/ and with another .htaccess (the same of support folder) can I use modrewrite on the 2 forums?
And on root I just put the robots.txt file like that:
| Code: |
User-agent: *
Disallow: /support/viewtopic.php
Disallow: /support/viewforum.php
Disallow: /support/index.php?
Disallow: /support/posting.php
Disallow: /support/groupcp.php
Disallow: /support/search.php
Disallow: /support/login.php
Disallow: /support/post
Disallow: /support/member
Disallow: /support/profile.php
Disallow: /support/memberlist.php
Disallow: /support/faq.php
Disallow: /friends/viewtopic.php
Disallow: /friends/viewforum.php
Disallow: /friends/index.php?
Disallow: /friends/posting.php
Disallow: /friends/groupcp.php |
that's right?
thx |
|
|
| Back to top |
|
 |
|
 |
dcz Administrateur - Site Admin

Joined: 28 Apr 2006 Posts: 15242
|
Posted: Wed Nov 08, 2006 10:14 am Post subject: Re: multiple rewrite |
|
|
You can add as many forum as your server can handle, remember that if they are all installed in a different sub domains, it's exactly like if they where totally independent.
The fact you install these sub domain in the man domain folder is what makes it possible for an extra access from the main domain. But it's this to be the exception, not the contrary. It's just because the physical files are located in a folder being available under two domains.
So in every sub domains folder, it work the same.
In every of them, you should implement the www prefix redirection (option number 2).
Then, in the main domain's .htaccess, you should add :
| Code: | RewriteCond %{REQUEST_URI} support/(.*) [NC]
RewriteRule ^(.*) http://support.example.com/%1 [QSA,L,R=301] |
and etc for all sub domains installed in the main domain's root sub-folders.
This way, any call to www.example.com/support/*.* will be HTTP 301 redirected to http://support.example.com/*.*.
Talking about robots.txt, it's the same, the only one active for a domain is the one located at his root. You thus need again to add one robots.txt (with path starting from sub domain's root) per sud-domain, no matter if they are installed in a main domain's sub-folder.
++ |
_________________ 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 |
|
 |
Snk
Joined: 08 Nov 2006 Posts: 4
|
Posted: Wed Nov 08, 2006 2:16 pm Post subject: Re: multiple rewrite |
|
|
Ok thanks  |
|
|
| Back to top |
|
 |
dcz Administrateur - Site Admin

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