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  
 
   
How to 301 redirect forum to subdomain
Goto page Previous  1, 2
 
Post new topic   Reply to topic    phpBB SEO » SEO Forum  » Apache mod Rewrite
::  
Author Message
dcz
Administrateur - Site Admin
Administrateur - Site Admin


Joined: 28 Apr 2006
Posts: 13354

How to 301 redirect forum to subdomainPosted: Sun Aug 12, 2007 10:37 am    Post subject: Re: How to 301 redirect forum to subdomain

Why it a tough one here.

Are you trying redirectmatch or mod_rewrite ?

_________________
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
visio



Joined: 31 May 2007
Posts: 22

How to 301 redirect forum to subdomainPosted: 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
Administrateur - Site Admin


Joined: 28 Apr 2006
Posts: 13354

How to 301 redirect forum to subdomainPosted: Sun Aug 12, 2007 12:29 pm    Post subject: Re: How to 301 redirect forum to subdomain

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.

++

_________________
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
visio



Joined: 31 May 2007
Posts: 22

How to 301 redirect forum to subdomainPosted: 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
Administrateur - Site Admin


Joined: 15 Mar 2006
Posts: 3137

How to 301 redirect forum to subdomainPosted: 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

How to 301 redirect forum to subdomainPosted: 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
Administrateur - Site Admin


Joined: 28 Apr 2006
Posts: 13354

How to 301 redirect forum to subdomainPosted: Mon Aug 13, 2007 5:19 pm    Post subject: Re: How to 301 redirect forum to subdomain

I need more details here, like what server are you using and what version.

The 404 is pretty odd, I can understand that redirectmatch provides with the query string, but the rewriterule ...

As well, please post again your full .htaccess just in case.

++

_________________
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
visio



Joined: 31 May 2007
Posts: 22

How to 301 redirect forum to subdomainPosted: 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
Administrateur - Site Admin


Joined: 28 Apr 2006
Posts: 13354

How to 301 redirect forum to subdomainPosted: Mon Aug 13, 2007 6:15 pm    Post subject: Re: How to 301 redirect forum to subdomain

I though :
Code:
RedirectMatch permanent ^/forums/(.*)$ http://forums.1stsearchenginerankings.com/$1

did not work at all ?

About your server, I meant the OS (Linux or windows most likely) and server software (Apache with Linux and IIS with windows most likely).

++

_________________
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
visio



Joined: 31 May 2007
Posts: 22

How to 301 redirect forum to subdomainPosted: 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
Administrateur - Site Admin


Joined: 28 Apr 2006
Posts: 13354

How to 301 redirect forum to subdomainPosted: Thu Aug 16, 2007 8:05 am    Post subject: Re: How to 301 redirect forum to subdomain

Can you confirm both :
Code:
RewriteRule ^/forums/(.*)$ http://forums.1stsearchenginerankings.com/$1 [L,R=301]


And :

Code:
RewriteRule ^forums/(.*)$ http://forums.1stsearchenginerankings.com/$1 [L,R=301]


do not work as expected ?

_________________
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  » Apache mod Rewrite
Page 2 of 2 Goto page Previous  1, 2

Navigation Similar Topics

Jump to: