Wrong 'Board index' link on error page

Discussions and support about the different URL Rewriting techniques for phpBB.

Moderator: Moderators

Wrong 'Board index' link on error page

Postby Crysis666 » Fri Oct 31, 2008 9:31 am

I am getting the wrong 'Board index' link on an error page triggered by -www.mysite.com/forums/download/file.php such as "attachment no longer exists" error.

The 'Board index' link for the rest of the site seems to be fine and points to -http://www.mysite.com/forums.html like it should, but the error page triggered by file.php has the link as -http://www.mysite.com/forums/forums.html

I guess because file.php is in a subfolder (download) then the link should have a "../" added to it to get rid of the extra "/forums/" part I don't want in the address... but how?
Crysis666
PR0
PR0
 
Posts: 58
Joined: Sat Jun 14, 2008 3:46 pm

Advertisement

Postby dcz » Mon Nov 03, 2008 9:15 am

So this occurs with the virtual root option, correct ?

I'll investigate more on this, but please confirm.

++
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: 21428
Joined: Fri Apr 28, 2006 9:03 pm

Postby Crysis666 » Mon Nov 03, 2008 11:37 am

Thanks for the reply.
Virtual Folder = Yes
Virtual Root = Yes
Crysis666
PR0
PR0
 
Posts: 58
Joined: Sat Jun 14, 2008 3:46 pm

Postby dcz » Mon Nov 03, 2008 2:39 pm

Ok I see, it's just another side effect of the fact that the phpbb_seo class is not aware about path in this version, next will be and this issue will disappear with it.

Until then, if you want to have this broken link to work, you could just replace :
Code: Select all
RewriteRule ^forum\.html$ /forums/index.php [QSA,L,NC]

with :
Code: Select all
RewriteRule ^(forums/)?forum\.html$ /forums/index.php [QSA,L,NC]


in your .htaccess, this would make the link work until the update.

++
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: 21428
Joined: Fri Apr 28, 2006 9:03 pm

Postby Crysis666 » Wed Nov 05, 2008 1:02 am

That code hasn't changed anything, I still have the wrong 'Board index' even after I purged all caches etc :( also just to let you know I am using
'forums' not 'forum'

eg. -www.mysite.com/forums.html
Crysis666
PR0
PR0
 
Posts: 58
Joined: Sat Jun 14, 2008 3:46 pm

Postby SeO » Wed Nov 05, 2008 8:09 am

Apart from the missing "s", the rewriterule is correct to allow the broken link to work as is, it won't change it, but it should work.

This is of course a temporary solution, which I think is enough for an error page link and until the update ;)
SeO
Admin
Admin
 
Posts: 6334
Joined: Wed Mar 15, 2006 9:41 pm

Postby Crysis666 » Wed Nov 05, 2008 10:32 am

It looks like this in my .htaccess for the past few days, all caches etc cleared but still no luck -

Code: Select all
<IfModule mod_rewrite.c>

RewriteEngine On

RewriteBase /

###############
# FORUMS PAGES
###############
# FORUM INDEX
RewriteRule ^(forums/)?forums\.html$ /forums/index.php [QSA,L,NC]
# FORUM
RewriteRule ^[a-z0-9_-]*-f([0-9]+)/?(page([0-9]+)\.html)?$ /forums/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$ /forums/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$ /forums/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$ /forums/viewtopic.php?forum_uri=$1&t=$2&start=$4 [QSA,L,NC]
# PROFILES THROUGH USERNAME
RewriteRule ^member/([^/]+)/?$ /forums/memberlist.php?mode=viewprofile&un=$1 [QSA,L,NC]
# USER MESSAGES THROUGH USERNAME
RewriteRule ^member/([^/]+)/(topics|posts)/?(page([0-9]+)\.html)?$ /forums/search.php?author=$1&sr=$2&start=$4 [QSA,L,NC]
# GROUPS ADVANCED
RewriteRule ^[a-z0-9_-]*-g([0-9]+)(-([0-9]+))?\.html$ /forums/memberlist.php?mode=group&g=$1&start=$3 [QSA,L,NC]
# POST
RewriteRule ^post([0-9]+)\.html$ /forums/viewtopic.php?p=$1 [QSA,L,NC]
# ACTIVE TOPICS
RewriteRule ^active-topics(-([0-9]+))?\.html$ /forums/search.php?search_id=active_topics&start=$2&sr=topics [QSA,L,NC]
# UNANSWERED TOPICS
RewriteRule ^unanswered(-([0-9]+))?\.html$ /forums/search.php?search_id=unanswered&start=$2&sr=topics [QSA,L,NC]
# NEW POSTS
RewriteRule ^newposts(-([0-9]+))?\.html$ /forums/search.php?search_id=newposts&start=$2&sr=topics [QSA,L,NC]
# THE TEAM
RewriteRule ^the-team\.html$ /forums/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 ^([a-z0-9_-]+)/?(page([0-9]+)\.html)?$ /forums/viewforum.php?forum_uri=$1&start=$3 [QSA,L,NC]
# END PHPBB PAGES
##############
RewriteRule ^(.*)\.html $1\.php

</IfModule>


Did I do something wrong with the directions you gave? If not it doesn't matter, I can wait till next update if thats what you suggest is better. Thanks for your help btw.
Crysis666
PR0
PR0
 
Posts: 58
Joined: Sat Jun 14, 2008 3:46 pm

Postby dcz » Sun Nov 09, 2008 8:44 am

Well isn't yourstie.com/forums/forums.html redirected to yourstie.com/forums.html with this tweak in the .htaccess ?
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: 21428
Joined: Fri Apr 28, 2006 9:03 pm

Postby Crysis666 » Mon Nov 10, 2008 4:08 am

No it does not work dcz. The 'HOME' breadcrumb points to a non existent page, when you press on it you are redirected to my home page when there is no page found at that address. So I guess its my cutom 404 error page redirector that is overriding this temp fix. And no it is not worthwhile taking out the 404 redirector just to make this bandaid fix work. When is this update you mentioned coming out then? I need this fix for subdirectories.
Crysis666
PR0
PR0
 
Posts: 58
Joined: Sat Jun 14, 2008 3:46 pm

Postby SeO » Mon Nov 10, 2008 8:31 am

mm, could you post or pm your site url ?

The update will follow phpBB 3.0.3 one, which should be out pretty soon now.
SeO
Admin
Admin
 
Posts: 6334
Joined: Wed Mar 15, 2006 9:41 pm

Re: Wrong 'Board index' link on error page

Postby Crysis666 » Sat May 16, 2009 11:51 am

Sorry for taking so long to get back to you about this but anyway I fixed the problem, the link was hard coded into my page wrong so I changed it to what it should be and everything works fine now. I think the link was something like "./forums.html" making it relative to the subfolder it was called from when it should have been "/forums.html" without the period. I should have seen that damn dot before I wasted your time, apologies :oops: Thanks for trying to help me with this problem though SeO and dcz, much appreciated.
Crysis666
PR0
PR0
 
Posts: 58
Joined: Sat Jun 14, 2008 3:46 pm

Re: Wrong 'Board index' link on error page

Postby dcz » Sun May 17, 2009 9:08 am

You're welcome ;)
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: 21428
Joined: Fri Apr 28, 2006 9:03 pm


Return to phpBB mod Rewrite

 


  • Related topics
    Replies
    Views
    Last post

Who is online

Users browsing this forum: ADmantX [Bot] and 4 guests