Forum 404

phpBB3 SEO Mixed mod Rewrite support forum. This mods performs URL rewriting for phpBB3, injecting forums in their URLs and keeping a static rewriting for topics.

Moderator: Moderators

Forum 404

Postby changout » Wed Feb 18, 2009 7:38 pm

Hello,

I have phpBB3 installed for a client of mine and they want the phpBB SEO installed too. I don't want to post the URL because their site is an adult site and I don't want to offend anyone in the community here.

phpBB is installed in the /forum dir, but the document root is also listed as /forum. So whenever you go to my URL it automatically puts you in the /forum area, thus making that my root. In other words if you went to -http://www.example.com/forum you would get a response that the location does not exist. However, if you went to -http://www.example.com it would show you the messageboard (that sits in var/www/example.com/forum, for example). Hopefully that makes sense.

I have looked through all the other 404 posts here and have tried the various options, but nothing is working yet. I have tried various settings (virtual and non) as well.

What would be the best way to diagnose this?

Thank you for your help.
changout
 
Posts: 5
Joined: Wed Feb 18, 2009 7:19 pm

Advertisement

Postby SeO » Thu Feb 19, 2009 10:48 am

I think that you just need to make sure that your configured script path (in phpBB's config ACP) is set to :
Code: Select all
/

and not :
Code: Select all
/forum

Because your domain's root in deed is the forum/ dir with your settings, thus phpBB is installed in the domain's root, not in a sub dir (phpBB does not care about VHOST).
SeO
Admin
Admin
 
Posts: 6333
Joined: Wed Mar 15, 2006 9:41 pm

Postby changout » Thu Feb 19, 2009 2:49 pm

Thank you for the help. I tried what you suggested, rebuilt the .htaccess, refreshed the cache (both the system and the theme) and it does get closer, but it's still not working yet.

Now, instead of
Code: Select all
http://www.example.com/forum/topic-fxx.html


...it shows
Code: Select all
http://www.example.com/topic-fxx.html


Which I believe is correct, but it still doesn't want to show the pages.

Just in case, here is my .htaccess
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 /
    # 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\.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]+)/topic([0-9]+)(-([0-9]+))?\.html$ /viewtopic.php?f=$1&t=$2&start=$4 [QSA,L,NC]
    # GLOBAL ANNOUNCES WITH VIRTUAL FOLDER
    RewriteRule ^announces/topic([0-9]+)(-([0-9]+))?\.html$ /viewtopic.php?t=$1&start=$3 [QSA,L,NC]
    # TOPIC WITHOUT FORUM ID & DELIM
    RewriteRule ^([a-z0-9_-]*)/?topic([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 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
    #####################################################


I've placed that in the -http://www.example.com/forum directory. Is that the correct place to put it or should it be in -http://www.example.com ?

Thank you again! I really appreciate the assistance. :)
changout
 
Posts: 5
Joined: Wed Feb 18, 2009 7:19 pm

Postby changout » Thu Feb 19, 2009 2:53 pm

Actually, I just tried moving the .htaccess back to -http://www.example.com instead of in -http://www.example.com/forum and that didn't work either. :(
changout
 
Posts: 5
Joined: Wed Feb 18, 2009 7:19 pm

Re: Forum 404

Postby dcz » Tue Feb 24, 2009 3:32 pm

Could just come from your server settings in acp, make sure you have the proper values for server domain and script path before you retry.

Your .htaccess should in all case mention at least once the forum/ path.
Useful links :
SEO Forum || SEO Directory || SEO phpBB || Search
____________________

Liens Utiles :
Forum référencement || Annuaire référencement || Référencement phpBB || Recherche
dcz
Admin
Admin
 
Posts: 21219
Joined: Fri Apr 28, 2006 9:03 pm

Re: Forum 404

Postby changout » Tue Feb 24, 2009 6:04 pm

dcz wrote:Could just come from your server settings in acp, make sure you have the proper values for server domain and script path before you retry.

Your .htaccess should in all case mention at least once the forum/ path.


Hi,

Thanks for the response. I have the following settings in the ACP (I'm going to use "example.com" instead of the actual URL since it's an adult site):

Code: Select all
Domain name:          example.com
Script Path:              /


I have also tried...

Code: Select all
Domain name:         example.com
Script path:             


(where I just leave the script path blank)

I left all of the SEO mod settings to their default values and then grabbed the .htaccess information (which looks just like the one posted above) and uploaded it to example.com/forum (and I put a copy in example.com as well, just in case). I set the SEO mod to YES. Then I refresh the main cache and the themes cache.

The URLS on the board do show up correctly when you hover of them, for example:

Code: Select all
http://www.example.com/general-chat-f32.html


...but when clicked you get:

Code: Select all
Not Found

The requested URL /general-chat-f32.html was not found on this server.


I do appreciate everyone's help on this. I have to make a decision by Friday to remove this mod if I can't get it to work, so I'm willing to try any other suggestions you may have. :)

Thanks again!
changout
 
Posts: 5
Joined: Wed Feb 18, 2009 7:19 pm

Re:

Postby dcz » Fri Feb 27, 2009 11:20 am

changout wrote:I've placed that in the -http://www.example.com/forum directory.


To me this means that your phpBB is installed in forum/
So you should have :
Code: Select all
Domain name:www.example.com
Script Path:/forum

and while you're at it :
Code: Select all
cookie domain:.example.com

with the dot (".") ;)
Useful links :
SEO Forum || SEO Directory || SEO phpBB || Search
____________________

Liens Utiles :
Forum référencement || Annuaire référencement || Référencement phpBB || Recherche
dcz
Admin
Admin
 
Posts: 21219
Joined: Fri Apr 28, 2006 9:03 pm

Postby changout » Fri Feb 27, 2009 5:04 pm

dcz wrote:To me this means that your phpBB is installed in forum/
So you should have :
Code: Select all
Domain name:www.example.com
Script Path:/forum

and while you're at it :
Code: Select all
cookie domain:.example.com

with the dot (".") ;)


Hello,

The issue with using /forum is that the server is configured to point http://www.example.com to the the /forum directory as its root. It resolves directly to:

Code: Select all
/var/www/example.com/forum


...so, according to apache, the /forum directory is the root.

I did try all the changes you suggested, though. I still get the 404's and now the urls are back to trying to implant the /forum in there, which apache is unable to resolve since that would be the equivelent of looking for:

Code: Select all
/var/www/example.com/forum/forum


...and that directory doesn't exist. ;)

However, I did leave the domain as http://www.example.com now and also the "." is in the cookie domain as you recommended.

Thanks again for trying. I really do appreciate it! :) If anyone has any further suggestions, please let me know.
changout
 
Posts: 5
Joined: Wed Feb 18, 2009 7:19 pm

Re: Forum 404

Postby SeO » Tue Mar 03, 2009 11:22 am

If /var/www/example.com/forum is the example.com domain's root, then use :
Code: Select all
Domain name:www.example.com
Script Path:/
cookie domain:.example.com


If the generated .htaccess does not work, try the right slash option after you submitted the more options option in the .htaccess generator.
If not enough, try the left one too, and combos. If not enough, you'll have to make sure that your server allows mod rewrite.
SeO
Admin
Admin
 
Posts: 6333
Joined: Wed Mar 15, 2006 9:41 pm


Return to Mixed SEO URL

 


  • Related topics
    Replies
    Views
    Last post

Who is online

Users browsing this forum: No registered users and 5 guests