I tried the following:
- Code: Select all
RewriteCond %{HTTP_HOST} ^(www\.)?domain\.com$
RewriteRule ^forums/(.*) http://forums.domain.com/$1 [R=301,L]
But it didn't work. How do I do this with both advanced mod rewrite installed and zero dup?
Moderator: Moderators
RewriteCond %{HTTP_HOST} ^(www\.)?domain\.com$
RewriteRule ^forums/(.*) http://forums.domain.com/$1 [R=301,L]RewriteRule ^forums/(.*) http://forums.example.com/$1 [QSA,R=301]

RewriteRule ^forums/(.*) http://forums.example.com/$1 [QSA,R=301,L]
#Options +FollowSymlinks
RewriteEngine On
RewriteBase /
RedirectMatch permanent ^/forums http://forums.1stsearchenginerankings.com/$1
RewriteCond %{HTTP_HOST} ^1stsearchenginerankings.com [NC]
RewriteRule ^(.*)$ http://www.1stsearchenginerankings.com/$1 [L,R=301]
# -FrontPage-
IndexIgnore .htaccess */.??* *~ *# */HEADER* */README* */_vti*
<Limit GET POST>
order deny,allow
deny from all
allow from all
</Limit>
<Limit PUT DELETE>
order deny,allow
deny from all
</Limit>
AuthName www.1stsearchenginerankings.com
AuthUserFile /home/search/public_html/_vti_pvt/service.pwd
AuthGroupFile /home/search/public_html/_vti_pvt/service.grp
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
# END WordPress
AddHandler application/x-httpd-php5 .php
#Options +FollowSymlinks
RewriteEngine On
RewriteBase /
#########################################################
# PHPBB SEO REWRITE RULES #
#########################################################
# AUTHOR : DCZ http://www.phpbb-seo.com/
# STARTED : 01/2006
#####################################################
# FORUMS PAGES
########################
# FORUM INDEX (un-comment if used)
RewriteRule ^index\.html$ /index.php [QSA,L,NC]
# FORUM PROTECTION RULE
RewriteRule ^[a-z0-9_-]*/([^/]+\.html)$ /index.php [R=301,L,NC]
# CATEGORIES
RewriteRule ^[a-z0-9_-]*-c([0-9]+)\.html$ /index.php?c=$1 [QSA,L,NC]
# PAGINATED FORUM
RewriteRule ^[a-z0-9_-]*-f([0-9]+)-([0-9]+)\.html$ /viewforum.php?f=$1&start=$2 [QSA,L,NC]
# FORUM
RewriteRule ^[a-z0-9_-]*-f([0-9]+)\.html$ /viewforum.php?f=$1 [QSA,L,NC]
# PAGINATED TOPIC
RewriteRule ^[a-z0-9_-]*-t([0-9]+)-([0-9]+)\.html$ /viewtopic.php?t=$1&start=$2 [QSA,L,NC]
# TOPIC
RewriteRule ^[a-z0-9_-]*-t([0-9]+)\.html$ /viewtopic.php?t=$1 [QSA,L,NC]
# POST
RewriteRule ^post([0-9]+)\.html$ /viewtopic.php?p=$1 [QSA,L,NC]
#PROFILES
RewriteRule ^member([0-9]+)\.html$ /profile.php?mode=viewprofile&u=$1 [QSA,L,NC]
# END PHPBB PAGES
#####################################################RewriteRule ^forum/(.*)$ http://forum.1stsearchenginerankings.com/$1 [QSA,L,R=301]RewriteRule ^(.*)$ http://www.1stsearchenginerankings.com/$1 [L,R=301] 
SeO wrote:Try adding :
- Code: Select all
RewriteRule ^forum/(.*)$ http://forum.1stsearchenginerankings.com/$1 [QSA,L,R=301]
After :
- Code: Select all
RewriteRule ^(.*)$ http://www.1stsearchenginerankings.com/$1 [L,R=301]
In your main domain .htaccess.
RewriteRule ^forums/(.*)$ http://forums.1stsearchenginerankings.com/$1 [L,R=301]
SeO wrote:mmm
Try :
- Code: Select all
RewriteRule ^forums/(.*)$ http://forums.1stsearchenginerankings.com/$1 [L,R=301]
RedirectMatch permanent ^/forums http://forums.1stsearchenginerankings.com/$1RedirectMatch permanent ^/forums/(.*)$ http://forums.1stsearchenginerankings.com/$1RedirectMatch permanent ^forums/(.*)$ http://forums.1stsearchenginerankings.com/$1
Users browsing this forum: No registered users and 5 guests