| :: |
| Author |
Message |
dcz Administrateur - Site Admin

Joined: 28 Apr 2006 Posts: 13354
|
|
| Back to top |
|
 |
|
 |
visio
Joined: 31 May 2007 Posts: 22
|
Posted: Sun Aug 12, 2007 11:56 am Post subject: Re: How to 301 redirect forum to subdomain |
|
|
I am using:
| Code: | | RedirectMatch permanent ^/forums/(.*)$ http://forums.1stsearchenginerankings.com/$1 |
|
|
|
| Back to top |
|
 |
dcz Administrateur - Site Admin

Joined: 28 Apr 2006 Posts: 13354
|
|
| Back to top |
|
 |
visio
Joined: 31 May 2007 Posts: 22
|
Posted: Sun Aug 12, 2007 12:47 pm Post subject: Re: How to 301 redirect forum to subdomain |
|
|
| dcz wrote: | Should work with something like :
| Code: | | RewriteRule ^forums/(.*)$ http://forums.1stsearchenginerankings.com/$1 [L,R=301] |
Try :
RewriteRule ^forums/(.*) http://forums.1stsearchenginerankings.com/$1 [L,R=301]
just in case, after rewrite engine is on of course.
++ |
Tried both as directed and both return a 404 when requesting a page which should redirect. |
|
|
| Back to top |
|
 |
SeO Administrateur - Site Admin

Joined: 15 Mar 2006 Posts: 3137
|
Posted: Sun Aug 12, 2007 1:11 pm Post subject: Re: How to 301 redirect forum to subdomain |
|
|
| dcz wrote: | | after rewrite engine is on |
This at least means you need :
| Code: | RewriteEngine on
RewriteBase / |
Before this line. |
_________________
|
|
| Back to top |
|
 |
visio
Joined: 31 May 2007 Posts: 22
|
Posted: Sun Aug 12, 2007 1:15 pm Post subject: Re: How to 301 redirect forum to subdomain |
|
|
| SeO wrote: | | dcz wrote: | | after rewrite engine is on |
This at least means you need :
| Code: | RewriteEngine on
RewriteBase / |
Before this line. |
Its there; |
|
|
| Back to top |
|
 |
dcz Administrateur - Site Admin

Joined: 28 Apr 2006 Posts: 13354
|
|
| Back to top |
|
 |
visio
Joined: 31 May 2007 Posts: 22
|
Posted: Mon Aug 13, 2007 6:02 pm Post subject: Re: How to 301 redirect forum to subdomain |
|
|
Not sure what you mean by what server and what version... please clarify that.
MAIN .HTACCESS
| Code: | #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 [R=301,L]
# -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 |
FORUMS .HTACCESS:
| Code: | #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
#####################################################
|
|
|
|
| Back to top |
|
 |
dcz Administrateur - Site Admin

Joined: 28 Apr 2006 Posts: 13354
|
|
| Back to top |
|
 |
visio
Joined: 31 May 2007 Posts: 22
|
Posted: Mon Aug 13, 2007 7:04 pm Post subject: Re: How to 301 redirect forum to subdomain |
|
|
Its linux with apache...
And no that code does redirect the urls it just adds the equivelent original dynamic url to the end after loading the page... but yeah it redirects to the right pages... |
|
|
| Back to top |
|
 |
dcz Administrateur - Site Admin

Joined: 28 Apr 2006 Posts: 13354
|
|
| Back to top |
|
 |
|
|