| :: |
| Author |
Message |
kevintmckay
Joined: 19 Oct 2007 Posts: 12
|
Posted: Fri Oct 19, 2007 6:21 am Post subject: I am not sure what my problem is... |
|
|
Hello,
I am trying to install the mixed mode mod rewrite code but having some problems. I have tried several times by hand and using easymod but no luck each time I can get to my forum root but after that I get 404's although I do see the url's being re written correctly. Any help could be greatly appreciated.
Here is my current setup for my site
phpBB 2.0.21-6 (Debian) default debian install
mysql-server-5.0
php4
apache 1.3
Debian default installs phpbb in /usr/share/phpbb2 and creates an alias
---------------- httpd.conf-----------------------
Alias /phpbb/images/avatars /var/lib/phpbb2/avatars
Alias /phpbb /usr/share/phpbb2/site
<DirectoryMatch /usr/share/phpbb2/site/>
<IfModule mod_php4.c>
php_flag register_globals off
</IfModule>
Options -Indexes +FollowSymlinks
DirectoryIndex index.php
AllowOverride None
order allow,deny
allow from all
</DirectoryMatch>
# here are my existing redirects and rewrites
RewriteEngine On
RewriteCond %{HTTP_HOST} ^simplefit\.org [nc]
RewriteRule ^/(.*) http://www.simplefit.org/$1 [R=301,L]
redirect 301 /workout.html http://www.simplefit.org/workouts.html
redirect 301 /workout http://www.simplefit.org/workouts.html
redirect 301 /blog http://www.simplefit.org/wordpress
--------------- httpd.conf ----------------------- |
Last edited by kevintmckay on Sun Oct 21, 2007 4:00 am; edited 2 times in total |
|
| Back to top |
|
 |
|
 |
HB phpBB SEO Team

Joined: 16 Oct 2006 Posts: 795
|
Posted: Fri Oct 19, 2007 2:04 pm Post subject: Re: I am not sure what my problem is... |
|
|
| kevintmckay wrote: | | ...each time I can get to my forum root but after that I get 404's although I do see the url's being re written correctly. Any help could be greatly appreciated. |
If the URLs are returned correctly but clicking them returns 404's, the incoming URLs aren't being correctly rewritten. Check your .htaccess modifications, confirm that rewriting is enabled (e.g., by writing a RewriteRule to map a non-existent file "blah.html" to an existing one -- it is found?). |
_________________ Dan Kehn |
|
| Back to top |
|
 |
kevintmckay
Joined: 19 Oct 2007 Posts: 12
|
Posted: Fri Oct 19, 2007 2:18 pm Post subject: Re: I am not sure what my problem is... |
|
|
this is the htaccess file I am using, is it correct?
# You could need to un-comment the following line
# Options +FollowSymlinks
RewriteEngine On
RewriteBase /
#########################################################
# PHPBB SEO REWRITE RULES #
#########################################################
# AUTHOR : DCZ http://www.phpbb-seo.com/
# STARTED : 01/2006
#####################################################
# FORUMS PAGES
########################
# FORUM INDEX (un-comment if used)
# RewriteRule ^phpbb/index\.html$ /phpbb/index.php [QSA,L,NC]
# FORUM PROTECTION RULE
# RewriteRule ^phpbb/[a-z0-9_-]+/([^/]+\.html)$ /phpbb/index.php [R=301,L,NC]
# CATEGORIES
RewriteRule ^phpbb/[a-z0-9_-]*-c([0-9]+)\.html$ /phpbb/index.php?c=$1 [QSA,L,NC]
# PAGINATED FORUM
RewriteRule ^phpbb/[a-z0-9_-]*-f([0-9]+)-([0-9]+)\.html$ /phpbb/viewforum.php?f=$1&start=$2 [QSA,L,NC]
# FORUM
RewriteRule ^phpbb/[a-z0-9_-]*-f([0-9]+)\.html$ /phpbb/viewforum.php?f=$1 [QSA,L,NC]
# PAGINATED TOPIC
RewriteRule ^phpbb/topic([0-9]+)-([0-9]+)\.html$ /phpbb/viewtopic.php?t=$1&start=$2 [QSA,L,NC]
# TOPIC
RewriteRule ^phpbb/topic([0-9]+)\.html$ /phpbb/viewtopic.php?t=$1 [QSA,L,NC]
# POST
RewriteRule ^phpbb/post([0-9]+)\.html$ /phpbb/viewtopic.php?p=$1 [QSA,L,NC]
#PROFILES
RewriteRule ^phpbb/member([0-9]+)\.html$ /phpbb/profile.php?mode=viewprofile&u=$1 [QSA,L,NC]
# END PHPBB PAGES
##################################################### |
|
|
| Back to top |
|
 |
HB phpBB SEO Team

Joined: 16 Oct 2006 Posts: 795
|
Posted: Fri Oct 19, 2007 2:24 pm Post subject: Re: I am not sure what my problem is... |
|
|
Looks right. Did you test that rewrite is enabled? Try adding a rule that refers to a non-existent file (blahblah.html) and returns one that does (about.html):
| Code: | | RewriteRule ^blahblah.html$ /about.html [L] |
|
_________________ Dan Kehn |
|
| Back to top |
|
 |
kevintmckay
Joined: 19 Oct 2007 Posts: 12
|
Posted: Fri Oct 19, 2007 2:29 pm Post subject: Re: I am not sure what my problem is... |
|
|
| removed vhost so no longer relevant |
Last edited by kevintmckay on Fri Oct 19, 2007 5:11 pm; edited 1 time in total |
|
| Back to top |
|
 |
kevintmckay
Joined: 19 Oct 2007 Posts: 12
|
Posted: Fri Oct 19, 2007 5:00 pm Post subject: Re: I am not sure what my problem is... |
|
|
you were right it was not enabled, I hav enabled it and the test mod rewrite is working
RewriteRule ^test.html$ /about.html [L]
http://www.simplefit.org/test.html
but when I drop my modified phpbb folder in place it is still not working, here is my .htaccess file which is now active
# You could need to un-comment the following line
Options +FollowSymlinks
RewriteEngine On
RewriteBase /
# FORUM INDEX (un-comment if used)
# RewriteRule ^phpbb/index\.html$ /phpbb/index.php [QSA,L,NC]
# FORUM PROTECTION RULE
# RewriteRule ^phpbb/[a-z0-9_-]+/([^/]+\.html)$ /phpbb/index.php [R=301,L,NC]
RewriteRule ^phpbb/[a-z0-9_-]*-c([0-9]+)\.html$ /phpbb/index.php?c=$1 [QSA,L,NC]
RewriteRule ^phpbb/[a-z0-9_-]*-f([0-9]+)-([0-9]+)\.html$ /phpbb/viewforum.php?f=$1&start=$2 [QSA,L,NC]
RewriteRule ^phpbb/[a-z0-9_-]*-f([0-9]+)\.html$ /phpbb/viewforum.php?f=$1 [QSA,L,NC]
RewriteRule ^phpbb/topic([0-9]+)-([0-9]+)\.html$ /phpbb/viewtopic.php?t=$1&start=$2 [QSA,L,NC]
RewriteRule ^phpbb/topic([0-9]+)\.html$ /phpbb/viewtopic.php?t=$1 [QSA,L,NC]
RewriteRule ^phpbb/post([0-9]+)\.html$ /phpbb/viewtopic.php?p=$1 [QSA,L,NC]
RewriteRule ^phpbb/member([0-9]+)\.html$ /phpbb/profile.php?mode=viewprofile&u=$1 [QSA,L,NC]
RewriteRule ^test.html$ /about.html [L]
any help would be greatly appreciated |
|
|
| Back to top |
|
 |
SeO Administrateur - Site Admin

Joined: 15 Mar 2006 Posts: 3128
|
Posted: Sat Oct 20, 2007 1:06 pm Post subject: Re: I am not sure what my problem is... |
|
|
| Have you activated url rewriting in ACP ? |
_________________
|
|
| Back to top |
|
 |
kevintmckay
Joined: 19 Oct 2007 Posts: 12
|
Posted: Sat Oct 20, 2007 2:29 pm Post subject: Re: I am not sure what my problem is... |
|
|
I do not know what that is?
I have installed the cyber alien sid removal mod by hand and I think that is working. I then made a full backup of that directory tree installed the mixed mode mod but the forum will not worked so moved it t the side and restored the working cyber alien backup. Not sure how to procede to get the mixed mod working. |
|
|
| Back to top |
|
 |
SeO Administrateur - Site Admin

Joined: 15 Mar 2006 Posts: 3128
|
Posted: Sat Oct 20, 2007 3:07 pm Post subject: Re: I am not sure what my problem is... |
|
|
oups, my fault, I confused with phpBB3.
So, where do you upload your .htaccess ?
And is there anything more than that in it ?
As is, it should be uploaded in your domain's root directory, eg one level above the phpbb/ folder.
Because rewriten links do not work so far : -http://www.simplefit.org/phpbb/post6408.html = 404
Once we'll have sort out the .htaccess thing, you'll just have to upload the modified files and it will work. |
_________________
|
|
| Back to top |
|
 |
kevintmckay
Joined: 19 Oct 2007 Posts: 12
|
Posted: Sun Oct 21, 2007 3:55 am Post subject: Re: I am not sure what my problem is... |
|
|
BTW does it at least look like I setup the cyber alien sid removal prerequisite correctly?
This is everything in my .htaccess and it is in my doc root
Options +FollowSymlinks
RewriteEngine On
RewriteBase /
# FORUM INDEX (un-comment if used)
# RewriteRule ^phpbb/index\.html$ /phpbb/index.php [QSA,L,NC]
# FORUM PROTECTION RULE
# RewriteRule ^phpbb/[a-z0-9_-]+/([^/]+\.html)$ /phpbb/index.php [R=301,L,NC]
RewriteRule ^phpbb/[a-z0-9_-]*-c([0-9]+)\.html$ /phpbb/index.php?c=$1 [QSA,L,NC]
RewriteRule ^phpbb/[a-z0-9_-]*-f([0-9]+)-([0-9]+)\.html$ /phpbb/viewforum.php?f=$1&start=$2 [QSA,L,NC]
RewriteRule ^phpbb/[a-z0-9_-]*-f([0-9]+)\.html$ /phpbb/viewforum.php?f=$1 [QSA,L,NC]
RewriteRule ^phpbb/topic([0-9]+)-([0-9]+)\.html$ /phpbb/viewtopic.php?t=$1&start=$2 [QSA,L,NC]
RewriteRule ^phpbb/topic([0-9]+)\.html$ /phpbb/viewtopic.php?t=$1 [QSA,L,NC]
RewriteRule ^phpbb/post([0-9]+)\.html$ /phpbb/viewtopic.php?p=$1 [QSA,L,NC]
RewriteRule ^phpbb/member([0-9]+)\.html$ /phpbb/profile.php?mode=viewprofile&u=$1 [QSA,L,NC]
RewriteRule ^test.html$ /about.html [L]
the test rule above is working.
as you can see from my first post the default Debian install puts phpbb in "/usr/share/phpbb" and then their is an alias in apache that points to it could that be the issue? |
|
|
| Back to top |
|
 |
dcz Administrateur - Site Admin

Joined: 28 Apr 2006 Posts: 13354
|
Posted: Sun Oct 21, 2007 4:29 pm Post subject: Re: I am not sure what my problem is... |
|
|
| kevintmckay wrote: |
as you can see from my first post the default Debian install puts phpbb in "/usr/share/phpbb" and then their is an alias in apache that points to it could that be the issue? |
The Options +FollowSymlinks should allow aliases to work.
It could be because of some VHOST settings, your .htaccess must have the right to start mod_rewrite and set up this option (allowoverride = ALL or something like that in the VHOST).
Because, -http://www.simplefit.org/phpbb/post6408.html still is a 404.
++ |
_________________ 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 |
|
 |
kevintmckay
Joined: 19 Oct 2007 Posts: 12
|
Posted: Mon Oct 22, 2007 5:00 pm Post subject: Re: I am not sure what my problem is... |
|
|
I removed all vhosts
the test rule below is working last line in .htaccess file.
RewriteRule ^test.html$ /about.html [L] |
|
|
| Back to top |
|
 |
kevintmckay
Joined: 19 Oct 2007 Posts: 12
|
Posted: Tue Oct 23, 2007 5:16 pm Post subject: Re: I am not sure what my problem is... |
|
|
| Could I pay one of you guys to fix this? |
|
|
| Back to top |
|
 |
SeO Administrateur - Site Admin

Joined: 15 Mar 2006 Posts: 3128
|
Posted: Tue Oct 23, 2007 5:40 pm Post subject: Re: I am not sure what my problem is... |
|
|
| kevintmckay wrote: | | I removed all vhosts |
Well, you need some.
And did you try to add :
In the Vhost ?
http://httpd.apache.org/docs/1.3/mod/core.html#allowoverride
It's required to allow .htaccess to start the mod_rewrite. |
_________________
|
|
| Back to top |
|
 |
kevintmckay
Joined: 19 Oct 2007 Posts: 12
|
Posted: Tue Oct 23, 2007 5:42 pm Post subject: Re: I am not sure what my problem is... |
|
|
if the rule below is working doesn't that mean mod rewrite is working?
RewriteRule ^test.html$ /about.html [L]
(this is working) http://www.simplefit.org/test.html |
|
|
| Back to top |
|
 |
|
|