Mixed mod Rewrite V 0.0.1 - phpbb V2.0.2.1 - 404 errors?

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

Moderator: Moderators

Mixed mod Rewrite V 0.0.1 - phpbb V2.0.2.1 - 404 errors?

Postby guyinoz » Fri Jun 09, 2006 12:20 pm

I've double checked the Mod and I've also double checked the Cyber alien Mod too. All seems right.

Mod_rewrite is enabled on server.

To see the problem here is the URL (please remove XXX)

XXXhttp://www.wager2win.co.uk/casino_forum/

As you can see all URL's are converted but as soon as you click on one they pull my custom 404 page.

Any idea as to what the problem could be?


Cheers

:)

PS here is the .htaccess

Code: Select all
Options +FollowSymlinks
RewriteEngine On
RewriteBase /
RewriteRule ^phpbb/.+/([^/]+\.html)$ /phpbb/index.php [R=301,L]
RewriteRule ^phpbb/.+-vc([0-9]+)\.html$ /phpbb/index.php?c=$1 [QSA,L]
RewriteRule ^phpbb/.+-vf([0-9]+)-([0-9]+)\.html$ /phpbb/viewforum.php?f=$1&start=$2 [QSA,L]
RewriteRule ^phpbb/.+-vf([0-9]+)\.html$ /phpbb/viewforum.php?f=$1 [QSA,L]
RewriteRule ^phpbb/topic([0-9]+)-([0-9]+)\.html$ /phpbb/viewtopic.php?t=$1&start=$2 [QSA,L]
RewriteRule ^phpbb/topic([0-9]+)\.html$ /phpbb/viewtopic.php?t=$1 [QSA,L] 
RewriteRule ^phpbb/post([0-9]+)\.html$ /phpbb/viewtopic.php?p=$1 [QSA,L]
RewriteRule ^phpbb/member([0-9]+)\.html$ /phpbb/profile.php?mode=viewprofile&u=$1 [QSA,L]
guyinoz
 
Posts: 7
Joined: Fri Jun 09, 2006 12:11 pm

Advertisement

Postby dcz » Fri Jun 09, 2006 12:33 pm

all right, very simple :

#
# phpBB is installed in a sud Folder :
#-----[ ADD ]------------------------------------------
#
# According to the specific hoster you are using, you might have to get rid of the "/" at the beginning of "phpbb/"
# Make sure to change phpbb/ with the actual folder name where phpBB is installed


;)

So here you should just put the .htaccess at the server's root level and change " phpbb" with "casino_forum".

By the way, "casino-forum" would be better to use ;)
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: 21238
Joined: Fri Apr 28, 2006 9:03 pm

Postby guyinoz » Fri Jun 09, 2006 12:43 pm

Hi dcz,

This is why one should never code when tired :lol: I miss things.

Options +FollowSymlinks
RewriteEngine On
RewriteBase /
RewriteRule ^casino_forum/.+/([^/]+\.html)$ /casino_forum/index.php [R=301,L]
RewriteRule ^casino_forum/.+-vc([0-9]+)\.html$ /casino_forum/index.php?c=$1 [QSA,L]
RewriteRule ^casino_forum/.+-vf([0-9]+)-([0-9]+)\.html$ /casino_forum/viewforum.php?f=$1&start=$2 [QSA,L]
RewriteRule ^casino_forum/.+-vf([0-9]+)\.html$ /casino_forum/viewforum.php?f=$1 [QSA,L]
RewriteRule ^casino_forum/topic([0-9]+)-([0-9]+)\.html$ /casino_forum/viewtopic.php?t=$1&start=$2 [QSA,L]
RewriteRule ^casino_forum/topic([0-9]+)\.html$ /casino_forum/viewtopic.php?t=$1 [QSA,L]
RewriteRule ^casino_forum/post([0-9]+)\.html$ /casino_forum/viewtopic.php?p=$1 [QSA,L]
RewriteRule ^casino_forum/member([0-9]+)\.html$ /casino_forum/profile.php?mode=viewprofile&u=$1 [QSA,L]


I've fixed things up but still not working?

Anyway ideas?


Cheers
guyinoz
 
Posts: 7
Joined: Fri Jun 09, 2006 12:11 pm

Postby dcz » Fri Jun 09, 2006 12:45 pm

Is this .htaccess located at the root level ?

And try as well to get rid of the "/" at the beginning of "casino_forum/" when applying.

does your ISP support mod rewrite ?
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: 21238
Joined: Fri Apr 28, 2006 9:03 pm

Postby guyinoz » Fri Jun 09, 2006 1:02 pm

Yes my host has mod_rewrite enabled. But doubled checked that with php info command on root ;)


Are you talking root level or root level of sub folder?

I've tried in both btw. Well not with updated .htaccess as you've instructed above.

I've removed RewriteBase /

But it produces a 500 internal error.

I'm a bit unsure exactly which "/" you are telling me to remove?




RewriteRule ^casino_forum/.+/([^/]+\.html)$ /casino_forum/index.php [R=301,L]


or this one?

RewriteRule ^casino_forum/.+/([^/]+\.html)$ /casino_forum/index.php [R=301,L]



Cheers
guyinoz
 
Posts: 7
Joined: Fri Jun 09, 2006 12:11 pm

Postby dcz » Fri Jun 09, 2006 1:11 pm

This one :

RewriteRule ^casino_forum/.+/([^/]+\.html)$ /casino_forum/index.php [R=301,L]



but do not forget to change "casino_forum" with "casino-forum" as it seems you changed your folder's name (on your home's link as well ;) )

Then, put those rewriterules in the main domain's root (usually www/) and it should work.

If you already have some rewriterule in your root's .htaccess, just put the one from this mod at the end of it, without repeating "rewrite engine on" etc ... on as said in the install.

In the end you will also have to take care of the www prefix issue.

And why not go further with mx Google sitemaps and mx Sitemaps ;)
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: 21238
Joined: Fri Apr 28, 2006 9:03 pm

Postby guyinoz » Fri Jun 09, 2006 1:27 pm

dcz,

Ok done all that but alas still not working :(

I really appreciate your help on this!

I might leave it for tonight and grab some rest then hit it with a clear head. I'll go baack to scratch and check code again...The try again.

If all else fails I post again...If it works I'll post and let you know :)


Cheers
guyinoz
 
Posts: 7
Joined: Fri Jun 09, 2006 12:11 pm

Postby dcz » Fri Jun 09, 2006 1:46 pm

Can you post your .htaccess again, the final one located in the domain's root folder (make sure no other stays in your forum's folder).

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

Postby guyinoz » Fri Jun 09, 2006 2:40 pm

Options +FollowSymlinks
RewriteEngine On
RewriteBase /
RewriteRule ^casino_forum/.+/([^/]+\.html)$ casino_forum/index.php [R=301,L]
RewriteRule ^casino_forum/.+-vc([0-9]+)\.html$ casino_forum/index.php?c=$1 [QSA,L]
RewriteRule ^casino_forum/.+-vf([0-9]+)-([0-9]+)\.html$ casino_forum/viewforum.php?f=$1&start=$2 [QSA,L]
RewriteRule ^casino_forum/.+-vf([0-9]+)\.html$ casino_forum/viewforum.php?f=$1 [QSA,L]
RewriteRule ^casino_forum/topic([0-9]+)-([0-9]+)\.html$ casino_forum/viewtopic.php?t=$1&start=$2 [QSA,L]
RewriteRule ^casino_forum/topic([0-9]+)\.html$ casino_forum/viewtopic.php?t=$1 [QSA,L]
RewriteRule ^casino_forum/post([0-9]+)\.html$ casino_forum/viewtopic.php?p=$1 [QSA,L]
RewriteRule ^casino_forum/member([0-9]+)\.html$ casino_forum/profile.php?mode=viewprofile&u=$1 [QSA,L]

<Files 403.shtml>
order allow,deny
allow from all
</Files>

ErrorDocument 404 XXXhttp://www.wager2win.co.uk/custom_page.html


(XXX added here so not to get the URL indexed - but in file not like this with XXX).

Cheers
guyinoz
 
Posts: 7
Joined: Fri Jun 09, 2006 12:11 pm

Postby dcz » Fri Jun 09, 2006 2:42 pm

change casino_forum with casino-forum ;)
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: 21238
Joined: Fri Apr 28, 2006 9:03 pm

Postby guyinoz » Sat Jun 10, 2006 4:33 am

Hi dcz,

Now I've had some much need rest I've gone back in a spotted some errors. In regards to the casino_forum I did change this to casino-forum, however, now I've realised that I've got around 50+ pages in total 80+ links to alter to change this to casino-forum so I've opted to leave it as is.

I've used underscore many times before and it doesn't seem to affect my ratings. In fact I've got about 10 pages that hold a PR6 that are full of underscores.

Anyways, I've managed to get it running now all is working fine, thanks.

I'll add a link back to you guys on the footer today sometime. Now I've got to customize the template and match it to my main site.

Thanks again for your help dcz :)


Cheers
guyinoz
 
Posts: 7
Joined: Fri Jun 09, 2006 12:11 pm

Postby dcz » Sat Jun 10, 2006 10:11 am

You are welcome.

Then, concerning your old links, I bet they are not rewritten, so you will disallow them with your robots.txt file and they won't help much you PageRank.
But, there is a smart solution :D
Change casino_forum to casino-forum and add this at the beginning of your .htaccess :

Code: Select all
RewriteRule ^casino_forum/ /casino-forum/ [R=301,L]


this way all old url like www.example.com/casino_forum/*.* will be http 301 redirected to www.example.com/casino-forum/ without any URI, so that all your old backlinks will be kept, and the deeper ones will lead to the forum index, which is a good target to concentrate PageRank ;)

more.

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

Postby guyinoz » Sat Jun 10, 2006 10:30 am

dcz,

Thanks for the extra heads up on that :)

Guess I could do that with any outdate URL I had, yes?

I ask as I've just changed back from nuke to generic static html.
I've got a heap of old urls like php?=Review and so out there. This seems like a good way to address these issues and not just using a custom 404 page.


Cheers
guyinoz
 
Posts: 7
Joined: Fri Jun 09, 2006 12:11 pm

Postby dcz » Sat Jun 10, 2006 10:50 am

it is often possible to build up good redirections, but, it's easier when you also change folder, please use the Apache mod rewrite forum for non phpBB related redirections ;)
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: 21238
Joined: Fri Apr 28, 2006 9:03 pm


Return to phpBB2 mod Rewrite

 


  • Related topics
    Replies
    Views
    Last post

Who is online

Users browsing this forum: No registered users and 1 guest