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  
 
   
mod_rewrite problem with Zend Framework and PHPBB-SEO

 
Post new topic   Reply to topic    phpBB SEO » SEO Forum  » phpBB3 Forum
::  
Author Message
parse



Joined: 31 Oct 2007
Posts: 1

mod_rewrite problem with Zend Framework and PHPBB-SEOPosted: Wed Oct 31, 2007 3:06 pm    Post subject: mod_rewrite problem with Zend Framework and PHPBB-SEO

Hi Folks! Great mod.

I've installed the bundled version with PHPBB RC7.
I'm also running Zend Framework, and I then put phpbb under forum/ in public_html

Usually I just put a .htaccess saying RewriteEngine Off in the subdir to make sure Zend Framework doesn't process it. But now that won't work!

This is my .htaccess for phpbb (/forum/.htaccess)
Code:
# Lines That should already be in your .htacess
<Files "config.php">
Order Allow,Deny
Deny from All
</Files>
<Files "common.php">
Order Allow,Deny
Deny from All
</Files>

# You may need to un-comment the following line
# Options +FollowSymlinks
# REMEBER YOU ONLY NEED TO STARD MOD REWRITE ONCE
RewriteEngine On
# REWRITE BASE
RewriteBase /forum/
# HERE IS A GOOD PLACE TO ADD THE WWW PREFIXE REDIRECTION

#####################################################
# PHPBB SEO REWRITE RULES - MIXED
#####################################################
# AUTHOR : dcz www.phpbb-seo.com
# STARTED : 01/2006
#################################
# FORUMS PAGES
###############
# FORUM INDEX REWRITERULE WOULD STAND HERE IF USED. 'forum' REQUIRES TO BE SET As FORUM INDEX
# RewriteRule ^forum/forum\.html$ /forum/index.php [QSA,L,NC]
# FORUM
RewriteRule ^forum/[a-z0-9_-]*-f([0-9]+)(-([0-9]+))?\.html$ /forum/viewforum.php?f=$1&start=$3 [QSA,L,NC]
# TOPIC WITH VIRTUAL FOLDER
RewriteRule ^forum/[a-z0-9_-]*-f([0-9]+)/topic([0-9]+)(-([0-9]+))?\.html$ /forum/viewtopic.php?f=$1&t=$2&start=$4 [QSA,L,NC]
# GLOBAL ANNOUNCES WITH VIRTUAL FOLDER
RewriteRule ^forum/announces/topic([0-9]+)(-([0-9]+))?\.html$ /forum/viewtopic.php?t=$1&start=$3 [QSA,L,NC]
# TOPIC WITHOUT FORUM ID & DELIM
RewriteRule ^forum/[a-z0-9_-]*/?topic([0-9]+)(-([0-9]+))?\.html$ /forum/viewtopic.php?t=$1&start=$3 [QSA,L,NC]
# POST
RewriteRule ^forum/post([0-9]+)\.html$ /forum/viewtopic.php?p=$1 [QSA,L,NC]
#PROFILES
RewriteRule ^forum/member([0-9]+)\.html$ /forum/memberlist.php?mode=viewprofile&u=$1 [QSA,L,NC]
# THE TEAM
RewriteRule ^forum/the-team\.html$ /forum/memberlist.php?mode=leaders [QSA,L,NC]
# HERE IS A GOOD PLACE TO ADD OTHER PHPBB RELATED REWRITERULES

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


This is my .htaccess for Zend Framework (/.htaccess)
Code:
RewriteEngine on
RewriteRule !\.(pdf|php|js|ico|txt|gif|jpg|png|css|rss|zip|tar\.gz)$ index.php
Back to top
dcz
Administrateur - Site Admin
Administrateur - Site Admin


Joined: 28 Apr 2006
Posts: 15242

mod_rewrite problem with Zend Framework and PHPBB-SEOPosted: Sat Nov 03, 2007 12:26 pm    Post subject: Re: mod_rewrite problem with Zend Framework and PHPBB-SEO

Running two .htaccess can sometime be tricky depending on your server settings.

But in your case, it looks like you edited the generated .htaccess, because you have :

Code:
RewriteBase /forum/


and you still mention the paths in the rewriterules :
Code:
RewriteRule ^forum/[a-z0-9_-]*-f([0-9]+)(-([0-9]+))?\.html$ /forum/viewforum.php?f=$1&start=$3 [QSA,L,NC]


etc ...

So, try re generating a new one after you have checked "more option" and then the "alternate location" option.

The forum's rewriterules will look like :
Code:
RewriteRule ^[a-z0-9_-]*-f([0-9]+)(-([0-9]+))?\.html$ viewforum.php?f=$1&start=$3 [QSA,L,NC]


Which should work directly with your set up, but could still require some extra slashes (still depending on your server settings).

If it's not enough, it's possible that :
Code:
RewriteEngine on
RewriteRule !\.(pdf|php|js|ico|txt|gif|jpg|png|css|rss|zip|tar\.gz)$ index.php


could be guilty, since the new url will use "/" and ".html" as suffixes.

But I doubt it, please first try to set up your forum's .htaccess as suggested.

++

_________________
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  » phpBB3 Forum
Page 1 of 1

Navigation Similar Topics

Jump to: