Advanced 4.4 Mod-Rewrite problem

phpBB3 SEO Advanced mod Rewrite support forum.
This mods performs URL rewriting for phpBB, injecting forums and topic titles in their URLs.

Moderator: Moderators

Advanced 4.4 Mod-Rewrite problem

Postby Bogey » Sat Dec 27, 2008 8:01 pm

Visit my site and try to view a forum or whatever... you can't because the mod rewrite doesn't work for me.

I used to use
Code: Select all
    <Files "config.php">
    Order Allow,Deny
    Deny from All
    </Files>

    <Files "common.php">
    Order Allow,Deny
    Deny from All
    </Files>

    RewriteEngine on

    Rewriterule ^(.+)-f([0-9]*).html-(.+)$            ./viewforum.php?f=$2&$3 [L]
    Rewriterule ^(.+)-(t|p)([0-9]*).html-(.+)$         ./viewtopic.php?$2=$3&$4 [L]
    Rewriterule ^(.+)-f([0-9]*)s([0-9]*).html-(.+)$      ./viewforum.php?f=$2&start=$3&$4 [L]
    Rewriterule ^(.+)-(t|p)([0-9]*)s([0-9]*).html-(.+)$   ./viewtopic.php?$2=$3&start=$4&$5 [L]

    Rewriterule ^(.+)-f([0-9]*).html$               ./viewforum.php?f=$2&$3 [L]
    Rewriterule ^(.+)-(t|p)([0-9]*).html$            ./viewtopic.php?$2=$3&$4 [L]
    Rewriterule ^(.+)-f([0-9]*)s([0-9]*).html$         ./viewforum.php?f=$2&start=$3&$4 [L]
    Rewriterule ^(.+)-(t|p)([0-9]*)s([0-9]*).html$      ./viewtopic.php?$2=$3&start=$4&$5 [L]
for my mod rewrite, but that provided me with two irritating problems, so I decided to try using the mod rewrite that this mod generated... it doesn't work as you can see.

I'm still using the 0.4.4 version rather than 4.8 version, but that's because I wasn't looking back at this and now that I did... I don't know how to update, since to install that mod, I had to go through lots of files and putting code in... I think it took me about good 20 minutes... I don't want to spend an hour searching for those code removing them, and then another 30 minutes installing the new version.

Anyway... how could I fix this problem? It's very irritating...
Bogey
 
Posts: 16
Joined: Sat Dec 27, 2008 7:56 pm

Advertisement

Postby Bogey » Sat Dec 27, 2008 8:36 pm

By the way, my .htaccess looks like...

Code: Select all
# 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 /
# HERE IS A GOOD PLACE TO ADD THE WWW PREFIXE REDIRECTION

#####################################################
# PHPBB SEO REWRITE RULES - ADVANCED
#####################################################
# 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\.html$ /index.php [QSA,L,NC]
# FORUM
RewriteRule ^[a-z0-9_-]*-f([0-9]+)(-([0-9]+))?\.html$ /viewforum.php?f=$1&start=$3 [QSA,L,NC]
# TOPIC WITH VIRTUAL FOLDER
RewriteRule ^[a-z0-9_-]*-f([0-9]+)/[a-z0-9_-]*-t([0-9]+)(-([0-9]+))?\.html$ /viewtopic.php?f=$1&t=$2&start=$4 [QSA,L,NC]
# GLOBAL ANNOUNCES WITH VIRTUAL FOLDER
RewriteRule ^announces/[a-z0-9_-]*-t([0-9]+)(-([0-9]+))?\.html$ /viewtopic.php?t=$1&start=$3 [QSA,L,NC]
# TOPIC WITHOUT FORUM ID & DELIM
RewriteRule ^([a-z0-9_-]*)/?[a-z0-9_-]*-t([0-9]+)(-([0-9]+))?\.html$ /viewtopic.php?forum_uri=$1&t=$2&start=$4 [QSA,L,NC]
# PROFILES THROUGH USERNAME
RewriteRule ^member/([^/]+)/?$ /memberlist.php?mode=viewprofile&un=$1 [QSA,L,NC]
# USER MESSAGES THROUGH USERNAME
RewriteRule ^member/([^/]+)/(topics|posts)/?(page([0-9]+)\.html)?$ /search.php?author=$1&sr=$2&start=$4 [QSA,L,NC]
# GROUPS ADVANCED
RewriteRule ^[a-z0-9_-]*-g([0-9]+)(-([0-9]+))?\.html$ /memberlist.php?mode=group&g=$1&start=$3 [QSA,L,NC]
# POST
RewriteRule ^post([0-9]+)\.html$ /viewtopic.php?p=$1 [QSA,L,NC]
# ACTIVE TOPICS
RewriteRule ^active-topics(-([0-9]+))?\.html$ /search.php?search_id=active_topics&start=$2&sr=topics [QSA,L,NC]
# UNANSWERED TOPICS
RewriteRule ^unanswered(-([0-9]+))?\.html$ /search.php?search_id=unanswered&start=$2&sr=topics [QSA,L,NC]
# NEW POSTS
RewriteRule ^newposts(-([0-9]+))?\.html$ /search.php?search_id=newposts&start=$2&sr=topics [QSA,L,NC]
# THE TEAM
RewriteRule ^the-team\.html$ /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
RewriteRule ^([a-z0-9_-]+)(-([0-9]+))\.html$ /viewforum.php?forum_uri=$1&start=$3 [QSA,L,NC]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^([a-z0-9_-]+)\.html$ /viewforum.php?forum_uri=$1 [QSA,L,NC]
# END PHPBB PAGES
#####################################################
Bogey
 
Posts: 16
Joined: Sat Dec 27, 2008 7:56 pm

Postby SeO » Sun Dec 28, 2008 8:17 am

This .htaccess is meant to be used in the domain's root (www.example.com/) with phpBB installed there too.

Your phpBB is installed in forum/ so it can't work as his.

Try to generate a new one online, and place it where the red message tells you to, should work ;)
SeO
Admin
Admin
 
Posts: 6333
Joined: Wed Mar 15, 2006 9:41 pm

Postby Bogey » Mon Dec 29, 2008 5:12 am

Ok.. I changed my htaccess and put it in the root directory of my site (where the directory where the forum resides in...) and it works!

Well, now that that's great, my CSS is not showing up... any help? It also seems longer to load than usual...
Bogey
 
Posts: 16
Joined: Sat Dec 27, 2008 7:56 pm

Postby GameSlim » Mon Dec 29, 2008 4:45 pm

I have the same problem, I can't seem to make it work on my second forum.. With my first forum, everything is great but that's because it's installed in the main root directory (www dot example dot com). My second forum however, is a wordpress blog installed in the main directory and I have a subfolder called "forums"..

I generated my .htaccess, placed in it my "/forums" directory and it wont work. My main board will of course show up, but clicking on the topics will redirect to my wordpress page saying Page Cannot be Found.

Here's my .htaccess code:

Code: Select all


    # 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 lines
    # Options +FollowSymlinks
    # To make sure that rewritten dir or file (/|.html) will not load dir.php in case it exist
    # Options -MultiViews
    # REMEBER YOU ONLY NEED TO STARD MOD REWRITE ONCE
    RewriteEngine On
    # REWRITE BASE
    RewriteBase /forums/
    # HERE IS A GOOD PLACE TO ADD THE WWW PREFIXE REDIRECTION

    #####################################################
    # PHPBB SEO REWRITE RULES - ADVANCED
    #####################################################
    # 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\.html$ /index.php [QSA,L,NC]
    # FORUM
    RewriteRule ^[a-z0-9_-]*-f([0-9]+)/?(page([0-9]+)\.html)?$ /viewforum.php?f=$1&start=$3 [QSA,L,NC]
    # TOPIC WITH VIRTUAL FOLDER
    RewriteRule ^[a-z0-9_-]*-f([0-9]+)/[a-z0-9_-]*-t([0-9]+)(-([0-9]+))?\.html$ /viewtopic.php?f=$1&t=$2&start=$4 [QSA,L,NC]
    # GLOBAL ANNOUNCES WITH VIRTUAL FOLDER
    RewriteRule ^announces/[a-z0-9_-]*-t([0-9]+)(-([0-9]+))?\.html$ /viewtopic.php?t=$1&start=$3 [QSA,L,NC]
    # TOPIC WITHOUT FORUM ID & DELIM
    RewriteRule ^([a-z0-9_-]*)/?[a-z0-9_-]*-t([0-9]+)(-([0-9]+))?\.html$ /viewtopic.php?forum_uri=$1&t=$2&start=$4 [QSA,L,NC]
    # PROFILES SIMPLE
    RewriteRule ^member([0-9]+)\.html$ /memberlist.php?mode=viewprofile&u=$1 [QSA,L,NC]
    # USER MESSAGES SIMPLE
    RewriteRule ^member([0-9]+)-(topics|posts)(-([0-9]+))?\.html$ /search.php?author_id=$1&sr=$2&start=$4 [QSA,L,NC]
    # GROUPS SIMPLE
    RewriteRule ^group([0-9]+)(-([0-9]+))?\.html$ /memberlist.php?mode=group&g=$1&start=$3 [QSA,L,NC]
    # POST
    RewriteRule ^post([0-9]+)\.html$ /viewtopic.php?p=$1 [QSA,L,NC]
    # ACTIVE TOPICS
    RewriteRule ^active-topics(-([0-9]+))?\.html$ /search.php?search_id=active_topics&start=$2&sr=topics [QSA,L,NC]
    # UNANSWERED TOPICS
    RewriteRule ^unanswered(-([0-9]+))?\.html$ /search.php?search_id=unanswered&start=$2&sr=topics [QSA,L,NC]
    # NEW POSTS
    RewriteRule ^newposts(-([0-9]+))?\.html$ /search.php?search_id=newposts&start=$2&sr=topics [QSA,L,NC]
    # THE TEAM
    RewriteRule ^the-team\.html$ /memberlist.php?mode=leaders [QSA,L,NC]
    # HERE IS A GOOD PLACE TO ADD OTHER PHPBB RELATED REWRITERULES

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



Any help will be greatly appreciated. Thanks!
GameSlim
 
Posts: 4
Joined: Thu Dec 18, 2008 4:32 pm

Postby Bogey » Tue Dec 30, 2008 1:15 am

lol you hijacked my thread!

My CSS still fails to open. Help would be greatly appreciated. I checked the source for both of the files, the forum home page (Where the CSS opens) and the forum/topic/member pages (Where CSS doesn't open) and they are linked the same.

Is it because of the virtual folder feature?
Bogey
 
Posts: 16
Joined: Sat Dec 27, 2008 7:56 pm

Postby Bogey » Tue Dec 30, 2008 7:02 am

Also, another problem was just descovered.

I have the virtual folders (When you view topics, the forum is shown like a folder), and when I want to go to the administration control panel, it tries to find the adm/ folder in that virtual folder...

I'm lost... help would be greatly appreciated here. Thanks

Please...
Bogey
 
Posts: 16
Joined: Sat Dec 27, 2008 7:56 pm

Postby SeO » Wed Dec 31, 2008 9:47 am

@Bogey make sure you implemented the required code change in all your installed themes and cleared the template's cache in style acp once you did.

The change that will fix all links is the one in overall_header.html.

@GameSlim how does a rewritten topic url looks like, does it include the forums/ dir ?

If not, must be the script path not properly set in phpBB's acp.
SeO
Admin
Admin
 
Posts: 6333
Joined: Wed Mar 15, 2006 9:41 pm


Return to Advanced SEO URL

 


  • Related topics
    Replies
    Views
    Last post

Who is online

Users browsing this forum: No registered users and 8 guests