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  
 
   
CPanel Subdomains / SEO HTACCESS

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



Joined: 11 Oct 2006
Posts: 30

CPanel Subdomains / SEO HTACCESSPosted: Sat Nov 03, 2007 7:57 am    Post subject: CPanel Subdomains / SEO HTACCESS

On the main website mysite the PHPBB SEO works fine. Then when I install it on mysite2 which is in reality site1.mysite made with CPanel subdomains it does not work. The htaccess file is below.

I assume that if I want to use rewrite on mysite2 that i would have to change the htaccess file on mysite1....

Correct or not....





Code:
# These three lines should only be added if not already done in the .htaccess

RemoveHandler .html .htm
AddHandler application/x-httpd-php .php .htm .html

    Options +FollowSymLinks

RewriteEngine on

RewriteCond %{HTTP_HOST} ^mysite.net [NC]

RewriteRule ^(.*)$ http://www.mysite.net/$1 [L,R=301]



RewriteBase /


ErrorDocument 404 /index.shtml

#########################################################
# forum SEO REWRITE RULES            #
#########################################################
# AUTHOR : DCZ http://www.forum-seo.com/
# STARTED : 01/2006
#####################################################
# FORUMS PAGES
########################
# FORUM INDEX (un-comment if used)
# RewriteRule ^forum/index\.html$ /forum/index.php [QSA,L,NC]
# FORUM PROTECTION RULE
# RewriteRule ^forum/[a-z0-9_-]*/([^/]+\.html)$ /forum/index.php [R=301,L,NC]
# CATEGORIES
RewriteRule ^forum/[a-z0-9_-]*-vc([0-9]+)\.html$ /forum/index.php?c=$1 [QSA,L,NC]
# PAGINATED FORUM
RewriteRule ^forum/[a-z0-9_-]*-vf([0-9]+)-([0-9]+)\.html$ /forum/viewforum.php?f=$1&start=$2 [QSA,L,NC]
# FORUM
RewriteRule ^forum/[a-z0-9_-]*-vf([0-9]+)\.html$ /forum/viewforum.php?f=$1 [QSA,L,NC]
# PAGINATED TOPIC
RewriteRule ^forum/[a-z0-9_-]*-vt([0-9]+)-([0-9]+)\.html$ /forum/viewtopic.php?t=$1&start=$2 [QSA,L,NC]
# TOPIC
RewriteRule ^forum/[a-z0-9_-]*-vt([0-9]+)\.html$ /forum/viewtopic.php?t=$1 [QSA,L,NC]
# POST
RewriteRule ^forum/post([0-9]+)\.html$ /forum/viewtopic.php?p=$1 [QSA,L,NC]
#PROFILES
RewriteRule ^forum/member([0-9]+)\.html$ /forum/profile.php?mode=viewprofile&u=$1 [QSA,L,NC]
# END forum PAGES
#####################################################
Back to top
TomaS
PR2
PR2


Joined: 08 Jun 2007
Posts: 226

CPanel Subdomains / SEO HTACCESSPosted: Sat Nov 03, 2007 11:16 am    Post subject: Re: CPanel Subdomains / SEO HTACCESS

i think this is absolutely bad, i past here my accsess.You dont have there name of folder whee is it etc
Code:
# Lines That should already be in your .htacess
<Files "config.php">
Order Allow,Deny
Deny from All
</Files>
<Files "common.php">
Order Allow,Deny
Deny from All
</Files>

# You may need to un-comment the following line
# Options +FollowSymlinks
# REMEBER YOU ONLY NEED TO STARD MOD REWRITE ONCE
RewriteEngine On
# REWRITE BASE
RewriteBase /forum/
# HERE IS A GOOD PLACE TO ADD THE WWW PREFIXE REDIRECTION
RewriteCond %{HTTP_HOST} ^phpbb3\.sk$ [NC]
RewriteRule ^(.*)$ http://www.phpbb3.sk/forum/$1 [R=301,L]


#####################################################
# PHPBB SEO REWRITE RULES - ADVANCED
#####################################################
# AUTHOR : dcz www.phpbb-seo.com
# STARTED : 01/2006
#################################
# FORUMS PAGES
###############
# FORUM INDEX REWRITERULE WOULD STAND HERE IF USED. 'forum' REQUIRES TO BE SET As FORUM INDEX
# RewriteRule ^forum\.html$ index.php [QSA,L,NC]
# FORUM
RewriteRule ^[a-z0-9_-]*-f([0-9]+)(-([0-9]+))?\.html$ viewforum.php?f=$1&start=$3 [QSA,L,NC]
# TOPIC WITH VIRTUAL FOLDER
RewriteRule ^[a-z0-9_-]*-f([0-9]+)/[a-z0-9_-]*-t([0-9]+)(-([0-9]+))?\.html$ viewtopic.php?f=$1&t=$2&start=$4 [QSA,L,NC]
# GLOBAL ANNOUNCES WITH VIRTUAL FOLDER
RewriteRule ^announces/[a-z0-9_-]*-t([0-9]+)(-([0-9]+))?\.html$ viewtopic.php?t=$1&start=$3 [QSA,L,NC]
# TOPIC WITHOUT FORUM ID & DELIM
RewriteRule ^[a-z0-9_-]*/?[a-z0-9_-]*-t([0-9]+)(-([0-9]+))?\.html$ viewtopic.php?t=$1&start=$3 [QSA,L,NC]
# POST
RewriteRule ^post([0-9]+)\.html$ viewtopic.php?p=$1 [QSA,L,NC]
#PROFILES
RewriteRule ^member([0-9]+)\.html$ memberlist.php?mode=viewprofile&u=$1 [QSA,L,NC]
# THE TEAM
RewriteRule ^the-team\.html$ memberlist.php?mode=leaders [QSA,L,NC]
# HERE IS A GOOD PLACE TO ADD OTHER PHPBB RELATED REWRITERULES

# FORUM WITHOUT ID & DELIM
# THESE FOUR LINES MUST BE LOCATED AT THE END OF YOUR HTACCESS TO WORK PROPERLY
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-l
RewriteRule ^[a-z0-9_-]+(-([0-9]+))?\.html$ viewforum.php?start=$2 [QSA,L,NC]
# END PHPBB PAGES
#####################################################

_________________
phpBB podpora-slovak phpBB support
slovenský preklad pre phpbb3-slovak translate for phpBB3
predaj a kupa domeny, marketing a internetove podnikanie- Slovak domain center
Back to top
Visit poster's website
AMH



Joined: 11 Oct 2006
Posts: 30

CPanel Subdomains / SEO HTACCESSPosted: Sat Nov 03, 2007 1:21 pm    Post subject: Re: CPanel Subdomains / SEO HTACCESS

RewriteRule ^forum/member([0-9]+)\.html$ /forum/profile.php?mode=viewprofile&u=$1 [QSA,L,NC]

That is the folder name. Forum.
Back to top
dcz
Administrateur - Site Admin
Administrateur - Site Admin


Joined: 28 Apr 2006
Posts: 14814

CPanel Subdomains / SEO HTACCESSPosted: Sat Nov 03, 2007 4:13 pm    Post subject: Re: CPanel Subdomains / SEO HTACCESS

It looks like a path issue.

So first, the main domain's .hatccess will only interact with the sub domain's one if the two a linked to the exact same folder on your ftp

If the sub domain is installed in a directory which can be accessed as a sub directory of the main domain, then, both .htaccess will work, but the sub domain one will be the one to matter for the sub domain.
The domain and it's sub domains should always be considered as two separate domains.

So, for the sub domain's forum, no matter where is the folder physically located, it's root start from where sub.domain.com is linked.

So if your second forum, being installed using the sub domain, is physically installed in www/forum/, it's still installed within the sub domain's root, you do not need to add path in the rewriterules in such case.

Please give more details if it's not enough 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
Display posts from previous:   
Post new topic   Reply to topic    phpBB SEO » SEO Forum  » phpBB3 mod Rewrite
Page 1 of 1

Navigation Similar Topics

Jump to: