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  
 
   
Help with .htaccess and Advanced Mod Rewrite 5

 
Post new topic   Reply to topic    phpBB SEO » SEO Forum  » Apache mod Rewrite
::  
Author Message
MarkDHamill



Joined: 13 Apr 2007
Posts: 8

Help with .htaccess and Advanced Mod Rewrite 5Posted: Sat Jul 12, 2008 2:06 am    Post subject: Help with .htaccess and Advanced Mod Rewrite 5

I am trying to install this for a client (phpBB 2). I am no mod_Rewrite expert but needless to say the following does not work. I cannot save a .htaccess file to the web root folder for certain regions so I saved it to the phpBB root, which is /forum off the web root where if I do it right all will be well. However it doesn't work.

Fixing this is probably simple if you know the secret:

Code:
# You could need to un-comment the following line
# Options +FollowSymlinks
RewriteEngine On
RewriteBase /forum

#########################################################
# 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: 14131

Help with .htaccess and Advanced Mod Rewrite 5Posted: Sat Jul 12, 2008 7:47 am    Post subject: Re: Help with .htaccess and Advanced Mod Rewrite 5

Try replacing :

Code:
RewriteBase /forum


with :

Code:
RewriteBase /forum/


and then delete the slash in front of all script-names and at the begining in rewriterules :

Code:
RewriteRule ^/[a-z0-9_-]*/([^/]+\.html)$ /index.php [R=301,L,NC]


becomes :
Code:
RewriteRule ^[a-z0-9_-]*/([^/]+\.html)$ index.php [R=301,L,NC] 


and so on.

Should work like this in most cases.

++

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



Joined: 13 Apr 2007
Posts: 8

Help with .htaccess and Advanced Mod Rewrite 5Posted: Sat Jul 12, 2008 12:21 pm    Post subject: Re: Help with .htaccess and Advanced Mod Rewrite 5

Thanks. I will give it a try!
Back to top
Display posts from previous:   
Post new topic   Reply to topic    phpBB SEO » SEO Forum  » Apache mod Rewrite
Page 1 of 1

Navigation Similar Topics

Jump to: