htacces with subdomain?

phpBB SEO Premod for phpBB3 support forum.
This premodded version of phpBB3 includes the three different type of URL rewriting for phpBB3 by phpBB SEO. It comes with several other Search Engine Optimization mods installed.

Moderator: Moderators


htacces with subdomain?

Postby mafiaWolf » Tue Jul 07, 2009 10:02 am

My current page is http://haclonghoi.co.cc/ChipChip
The seo link like that:
haclonghoi.co.cc/da-phuong-tien/14-cong-cu-chuyen-doi-file-media-manh-me-va-mien-phi-t8.html
with .htaccess at root :http://haclonghoi.co.cc
Code: Select all

# You may need to un-comment the following lines
# Options +FollowSymlinks
# To make sure that rewritten dir or file (/|.html) will not load dir.php in case it exist
# Options -MultiViews
# REMEBER YOU ONLY NEED TO STARD MOD REWRITE ONCE
RewriteEngine On
# REWRITE BASE
RewriteBase /ChipChip
# HERE IS A GOOD PLACE TO FORCE CANONICAL DOMAIN
# RewriteCond %{HTTP_HOST} !^haclonghoi\.co\.cc$ [NC]
# RewriteRule ^(.*)$ http://haclonghoi.co.cc/$1 [QSA,L,R=301]

# DO NOT GO FURTHER IF THE REQUESTED FILE / DIR DOES EXISTS
RewriteCond %{REQUEST_FILENAME} -f
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule . - [L]
#####################################################
# PHPBB SEO REWRITE RULES ALL MODES
#####################################################
# AUTHOR : dcz www.phpbb-seo.com
# STARTED : 01/2006
#################################
# FORUMS PAGES
###############
# FORUM INDEX
RewriteRule ^chipchip\.html$ /ChipChip/index.php [QSA,L,NC]
# FORUM ALL MODES
RewriteRule ^(forum|[a-z0-9_-]*-f)([0-9]+)/?(page([0-9]+)\.html)?$ /ChipChip/viewforum.php?f=$2&start=$4 [QSA,L,NC]
# TOPIC WITH VIRTUAL FOLDER ALL MODES
RewriteRule ^(forum|[a-z0-9_-]*-f)([0-9]+)/(topic|[a-z0-9_-]*-t)([0-9]+)(-([0-9]+))?\.html$ /ChipChip/viewtopic.php?f=$2&t=$4&start=$6 [QSA,L,NC]
# GLOBAL ANNOUNCES WITH VIRTUAL FOLDER ALL MODES
RewriteRule ^announces/(topic|[a-z0-9_-]*-t)([0-9]+)(-([0-9]+))?\.html$ /ChipChip/viewtopic.php?t=$2&start=$4 [QSA,L,NC]
# TOPIC WITHOUT FORUM ID & DELIM ALL MODES
RewriteRule ^([a-z0-9_-]*)/?(topic|[a-z0-9_-]*-t)([0-9]+)(-([0-9]+))?\.html$ /ChipChip/viewtopic.php?forum_uri=$1&t=$3&start=$5 [QSA,L,NC]
# PHPBB FILES ALL MODES
RewriteRule ^resources/[a-z0-9_-]+/(thumb/)?([0-9]+)$ /ChipChip/download/file.php?id=$2&t=$1 [QSA,L,NC]
# PROFILES THROUGH USERNAME
RewriteRule ^member/([^/]+)/?$ /ChipChip/memberlist.php?mode=viewprofile&un=$1 [QSA,L,NC]
# USER MESSAGES THROUGH USERNAME
RewriteRule ^member/([^/]+)/(topics|posts)/?(page([0-9]+)\.html)?$ /ChipChip/search.php?author=$1&sr=$2&start=$4 [QSA,L,NC]
# GROUPS ALL MODES
RewriteRule ^(group|[a-z0-9_-]*-g)([0-9]+)(-([0-9]+))?\.html$ /ChipChip/memberlist.php?mode=group&g=$2&start=$4 [QSA,L,NC]
# POST
RewriteRule ^post([0-9]+)\.html$ /ChipChip/viewtopic.php?p=$1 [QSA,L,NC]
# ACTIVE TOPICS
RewriteRule ^active-topics(-([0-9]+))?\.html$ /ChipChip/search.php?search_id=active_topics&start=$2&sr=topics [QSA,L,NC]
# UNANSWERED TOPICS
RewriteRule ^unanswered(-([0-9]+))?\.html$ /ChipChip/search.php?search_id=unanswered&start=$2&sr=topics [QSA,L,NC]
# NEW POSTS
RewriteRule ^newposts(-([0-9]+))?\.html$ /ChipChip/search.php?search_id=newposts&start=$2&sr=topics [QSA,L,NC]
# THE TEAM
RewriteRule ^the-team\.html$ /ChipChip/memberlist.php?mode=leaders [QSA,L,NC]
# HERE IS A GOOD PLACE TO ADD OTHER PHPBB RELATED REWRITERULES

#####################################################
# GYM Sitemaps & RSS
# Global channels
RewriteRule ^ChipChip/rss(/(news)+)?(/(digest)+)?(/(short|long)+)?/?$ /ChipChip/gymrss.php?channels&$2&$4&$6 [QSA,L,NC]
# HTML Global news & maps
RewriteRule ^ChipChip/(news|maps)/?(page([0-9]+)\.html)?$ /ChipChip/map.php?$1&start=$3 [QSA,L,NC]
# END GYM Sitemaps & RSS
#####################################################

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

#####################################################
# GYM Sitemaps & RSS
# HTML Module additional modes
RewriteRule ^ChipChip/(news|maps)/([a-z0-9_-]+)(/([a-z0-9_-]+))?/?(page([0-9]+)\.html)?$ /ChipChip/map.php?$2=$4&$1&start=$6 [QSA,L,NC]
# Main feeds & channels
RewriteRule ^ChipChip/rss(/(news)+)?(/(digest)+)?(/(short|long)+)?(/([a-z0-9_-]+))?/([a-z0-9_]+)\.xml(\.gz)?$ /ChipChip/gymrss.php?$9=$8&$2&$4&$6&gzip=$10 [QSA,L,NC]
# Module feeds
RewriteRule ^ChipChip/[a-z0-9_-]*-[a-z]{1}([0-9]+)(/(news)+)?(/(digest)+)?(/(short|long)+)?/([a-z0-9_]+)\.xml(\.gz)?$ /ChipChip/gymrss.php?$8=$1&$3&$5&$7&gzip=$9 [QSA,L,NC]
# Module feeds without ids
RewriteRule ^ChipChip/([a-z0-9_-]+)(/(news)+)?(/(digest)+)?(/(short|long)+)?/([a-z0-9_]+)\.xml(\.gz)?$ /ChipChip/gymrss.php?nametoid=$1&$3&$5&$7&modulename=$8&gzip=$9 [QSA,L,NC]
# Google SitemapIndex
RewriteRule ^ChipChip/sitemapindex\.xml(\.gz)?$ /ChipChip/sitemap.php?gzip=$1 [QSA,L,NC]
# Module cat sitemaps
RewriteRule ^ChipChip/[a-z0-9_-]+-([a-z]{1})([0-9]+)\.xml(\.gz)?$ /ChipChip/sitemap.php?module_sep=$1&module_sub=$2&gzip=$3 [QSA,L,NC]
# Module sitemaps
RewriteRule ^ChipChip/([a-z0-9_]+)-([a-z0-9_-]+)\.xml(\.gz)?$ /ChipChip/sitemap.php?$1=$2&gzip=$3 [QSA,L,NC]
# END GYM Sitemaps & RSS
#####################################################

but i want to rewite link must have /ChipChip like
haclonghoi.co.cc/ChipChip/da-phuong-tien/14-cong-cu-chuyen-doi-file-media-manh-me-va-mien-phi-t8.html
or
chipchip.haclonghoi.co.cc/da-phuong-tien/14-cong-cu-chuyen-doi-file-media-manh-me-va-mien-phi-t8.html

How to do it?
mafiaWolf
 
Posts: 34
Joined: Thu Jun 04, 2009 2:28 am

Advertisement

Re: htacces with subdomain?

Postby mafiaWolf » Tue Jul 07, 2009 10:08 am

oh..i 've soled it...turn off virtual root..
But how to change http://haclonghoi.co.cc/ChipChip to http://chipchip.haclonghoi.co.cc with url rewrite?
mafiaWolf
 
Posts: 34
Joined: Thu Jun 04, 2009 2:28 am

Re: htacces with subdomain?

Postby dcz » Fri Jul 10, 2009 3:05 pm

Well this is not really a mod_rewrite matter, but rather a matter of properly moving your forum to a sub domain. The topic was already well covered SEOwise, so first thing is to have a look and think twice about what you want to do and why.

Then, as far as mod_rewrite, a domain is not different from a sub domain, and -www.example.com is already a genuine sub domain of example.com, being THE domain.
So to move phpBB to the sub domain, you'll only have to move all files where this sub domain is reachable and update the phpBB Server and Cookie settings accordingly (script path starting from sub domain's root included).

Then, you would need to properly redirect the phpBB old url (main domain) to the new one (sub domain). Here is a post I recently wrote that explain the matter :
Re: Help on URL Rewrite

++
Useful links :
SEO Forum || SEO Directory || SEO phpBB || Search
____________________

Liens Utiles :
Forum référencement || Annuaire référencement || Référencement phpBB || Recherche
dcz
Admin
Admin
 
Posts: 20100
Joined: Fri Apr 28, 2006 9:03 pm


Return to phpBB SEO Premod

 


  • Related topics
    Replies
    Views
    Last post

Who is online

Users browsing this forum: No registered users and 4 guests


 
cron