| :: |
| Author |
Message |
j2ross
Joined: 21 May 2008 Posts: 12
|
Posted: Wed May 21, 2008 10:22 pm Post subject: Links not rewriting? |
|
|
On my site http://www.noluckneeded.com I am seeing that the links on my site show the old url (viewtopic.php...etc) and only when I click on them will they transform into the rewritten url. Why is this happening?
Here is my .htaccess:
DirectoryIndex portal.php
ErrorDocument 404 http://www.noluckneeded.com
RewriteEngine On
rewritecond %{http_host} ^noluckneeded\.com [nc]
rewriterule ^(.*)$ http://www.noluckneeded.com/$1 [r=301,nc]
RewriteBase /
#########################################################
# PHPBB SEO REWRITE RULES #
#########################################################
# AUTHOR : dcz http://www.phpbb-seo.com/
# STARTED : 01/2006
#####################################################
# FORUMS PAGES
########################
# FORUM INDEX (un-comment if used)
RewriteRule ^index\.html$ index.php [QSA,L,NC]
# FORUM PROTECTION RULE
#RewriteRule ^[a-z0-9_-]+/([^/]+\.html)$ index.php [R=301,L,NC]
# CATEGORIES
RewriteRule ^[a-z0-9_-]*-c([0-9]+)\.html$ index.php?c=$1 [QSA,L,NC]
# PAGINATED FORUM
RewriteRule ^[a-z0-9_-]*-f([0-9]+)-([0-9]+)\.html$ viewforum.php?f=$1&start=$2 [QSA,L,NC]
# FORUM
RewriteRule ^[a-z0-9_-]*-f([0-9]+)\.html$ /viewforum.php?f=$1 [QSA,L,NC]
# PAGINATED TOPIC
RewriteRule ^[a-z0-9_-]*-t([0-9]+)-([0-9]+)\.html$ viewtopic.php?t=$1&start=$2 [QSA,L,NC]
# TOPIC
RewriteRule ^[a-z0-9_-]*-t([0-9]+)\.html$ viewtopic.php?t=$1 [QSA,L,NC]
# POST
RewriteRule ^post([0-9]+)\.html$ viewtopic.php?p=$1 [QSA,L,NC]
#PROFILES
RewriteRule ^member([0-9]+)\.html$ profile.php?mode=viewprofile&u=$1 [QSA,L,NC]
# END PHPBB PAGES
#####################################################
RewriteRule ^forums.* index.php [L,NC]
RewriteRule ^post-([0-9]*).html&highlight=([a-zA-Z0-9]*) viewtopic.php?p=$1&highlight=$2 [L,NC]
RewriteRule ^post-([0-9]*).* viewtopic.php?p=$1 [L,NC]
RewriteRule ^view-poll([0-9]*)-([0-9]*)-([a-zA-Z]*).* viewtopic.php?t=$1&postdays=$2&postorder=$3&vote=viewresult
[L,NC]
RewriteRule ^about([0-9]*).html&highlight=([a-zA-Z0-9]*) viewtopic.php?t=$1&highlight=$2 [L,NC]
RewriteRule ^about([0-9]*).html&view=newest viewtopic.php?t=$1&view=newest [L,NC]
RewriteRule ^about([0-9]*)-([0-9]*)-([a-zA-Z]*)-([0-9]*).* viewtopic.php?t=$1&postdays=$2&postorder=$3&start=$4
[L,NC]
RewriteRule ^about([0-9]*)-([0-9]*).* viewtopic.php?t=$1&start=$2 [L,NC]
RewriteRule ^about([0-9]*).* viewtopic.php?t=$1 [L,NC]
RewriteRule ^about([0-9]*).html viewtopic.php?t=$1&start=$2&postdays=$3&postorder=$4&highlight=$5 [L,NC]
RewriteRule ^mark-forum([0-9]*).html* viewforum.php?f=$1&mark=topics [L,NC]
RewriteRule ^updates-topic([0-9]*).html* viewtopic.php?t=$1&watch=topic [L,NC]
RewriteRule ^stop-updates-topic([0-9]*).html* viewtopic.php?t=$1&unwatch=topic [L,NC]
RewriteRule ^forum-([0-9]*).html viewforum.php?f=$1 [L,NC]
RewriteRule ^forum-([0-9]*).* viewforum.php?f=$1 [L,NC]
RewriteRule ^topic-([0-9]*)-([0-9]*)-([0-9]*).* viewforum.php?f=$1&topicdays=$2&start=$3 [L,NC]
RewriteRule ^ptopic([0-9]*).* viewtopic.php?t=$1&view=previous [L,NC]
RewriteRule ^ntopic([0-9]*).* viewtopic.php?t=$1&view=next [L,NC] |
|
|
| Back to top |
|
 |
|
 |
MathieuM. phpBB SEO Team


Joined: 10 Feb 2008 Posts: 447 Location: Rhône-Alpes
|
|
| Back to top |
|
 |
j2ross
Joined: 21 May 2008 Posts: 12
|
Posted: Thu May 22, 2008 12:10 am Post subject: Re: Links not rewriting? |
|
|
| I have already installed the advanced zero duplicate mod along with the advanced phpbb seo mod. |
|
|
| Back to top |
|
 |
MathieuM. phpBB SEO Team


Joined: 10 Feb 2008 Posts: 447 Location: Rhône-Alpes
|
|
| Back to top |
|
 |
j2ross
Joined: 21 May 2008 Posts: 12
|
Posted: Thu May 22, 2008 2:28 pm Post subject: Re: Links not rewriting? |
|
|
What??
In my post I said I already installed the Zero Duplicate Mod, that is what is on my site now and its not working.
As far as I know the no duplilcate mod is for phpbb3 only.
Irregardless something is not working correctly, and thus my problem.
I'm going to have to uninstall this I suppose. |
|
|
| Back to top |
|
 |
MathieuM. phpBB SEO Team


Joined: 10 Feb 2008 Posts: 447 Location: Rhône-Alpes
|
|
| Back to top |
|
 |
j2ross
Joined: 21 May 2008 Posts: 12
|
Posted: Thu May 22, 2008 6:45 pm Post subject: Re: Links not rewriting? |
|
|
| Ok thats fine. Is there any clue as to at least what file could be causing this? I've been reading documentationa and crawling through code all day today and yesterday to fix this as I really don't want to revert back to my old seo mod. |
|
|
| Back to top |
|
 |
SeO Administrateur - Site Admin

Joined: 15 Mar 2006 Posts: 3137
|
Posted: Thu May 22, 2008 7:58 pm Post subject: Re: Links not rewriting? |
|
|
So, the zero duplicate works well, and the .htaccess is on, so it's only a problem with the advanced mod rewrite installation.
Since no link at all are rewritten, the problem could be dealing with the includes/functions.php code change.
Please double check the file, as well as the rest of the mod's code change in case it's not enough, should work.
As well, if you previously where using another mod rewrite you may need to keep some of the old rewriterules up and running in your new .htaccess to allow the zero duplicate to perform the required redirecting. |
_________________
|
|
| Back to top |
|
 |
j2ross
Joined: 21 May 2008 Posts: 12
|
Posted: Thu May 22, 2008 9:34 pm Post subject: Re: Links not rewriting? |
|
|
| SeO wrote: | So, the zero duplicate works well, and the .htaccess is on, so it's only a problem with the advanced mod rewrite installation.
Since no link at all are rewritten, the problem could be dealing with the includes/functions.php code change.
Please double check the file, as well as the rest of the mod's code change in case it's not enough, should work.
As well, if you previously where using another mod rewrite you may need to keep some of the old rewriterules up and running in your new .htaccess to allow the zero duplicate to perform the required redirecting. |
I've tripled checked all files and again tried to redo functions.php from scratch but to no avail. I can't figure out what is wrong, but my board is heavily modded. Maybe there is a conflict somewhere.
I have kept my existing rewrite mod in the htaccess file and that redirects nicely. If you have a chance here is my functions code, maybe you can spot something;
[mod]Code is too long, please post a zip [/mod] |
|
|
| Back to top |
|
 |
SeO Administrateur - Site Admin

Joined: 15 Mar 2006 Posts: 3137
|
Posted: Fri May 23, 2008 2:56 pm Post subject: Re: Links not rewriting? |
|
|
Did not see anything obvious in your function.php file, have you double checked the append_sid() function code change in includes/sessions.php ?
As well, could you post a zip of your phpbb_seo_class.php file ? |
_________________
|
|
| Back to top |
|
 |
j2ross
Joined: 21 May 2008 Posts: 12
|
Posted: Fri May 23, 2008 3:13 pm Post subject: Re: Links not rewriting? |
|
|
Here is the sessions code, I'll post the zip in a bit.
| Code: | function append_sid($url, $non_html_amp = false)
{
global $SID;
// www.phpBB-SEO.com SEO TOOLKIT BEGIN
global $phpbb_seo;
$url = $phpbb_seo->url_rewrite($url, $non_html_amp);
// www.phpBB-SEO.com SEO TOOLKIT END
if ( !empty($SID) && !preg_match('#sid=#', $url) && !strstr($_SERVER['HTTP_USER_AGENT'] ,'Googlebot') && !strstr($_SERVER['HTTP_USER_AGENT'] ,'msnbot') && !strstr($_SERVER['HTTP_USER_AGENT'] ,'Slurp') && !strstr($_SERVER['HTTP_USER_AGENT'] ,'almaden.ibm.com') && !strstr($_SERVER['HTTP_USER_AGENT'] ,'zyborg') && !strstr($_SERVER['HTTP_USER_AGENT'] ,'Jeeves') && !strstr($_SERVER['HTTP_USER_AGENT'] ,'crawler') && !strstr($_SERVER['HTTP_USER_AGENT'] ,'spider') )
{
$url .= ( ( strpos($url, '?') != false ) ? ( ( $non_html_amp ) ? '&' : '&' ) : '?' ) . $SID;
}
return $url;
} |
|
|
|
| Back to top |
|
 |
j2ross
Joined: 21 May 2008 Posts: 12
|
|
| Back to top |
|
 |
SeO Administrateur - Site Admin

Joined: 15 Mar 2006 Posts: 3137
|
Posted: Fri May 23, 2008 3:36 pm Post subject: Re: Links not rewriting? |
|
|
mmm... everything seems right in there too.
Must be a mod, but I can't think of any, what mod did you install on your forum that could have altered the url structure ?
Did you uninstall fully the old url rewriting mod (besides the .htaccess) ?
It could be easier to keep your old rewriting until you convert to phpBB3, at least, thinking about it seems wise since we should all consider converting this year. Could save some (soon to be useless) work on phpBB2 and save a massive redirect. |
_________________
|
|
| Back to top |
|
 |
j2ross
Joined: 21 May 2008 Posts: 12
|
Posted: Fri May 23, 2008 3:45 pm Post subject: Re: Links not rewriting? |
|
|
I have uninstalled the able2know mod except I kept the htaccess stuff to ensure successful redirect.
Other than that I run an orion cback portal which is a fully loaded with lots of mods.
I have no plans on upgrading to phpbb3 in the near future. |
|
|
| Back to top |
|
 |
j2ross
Joined: 21 May 2008 Posts: 12
|
Posted: Fri May 23, 2008 3:51 pm Post subject: Re: Links not rewriting? |
|
|
Wow, I'm an idiot.
So for whatever reason I had a sessions.php file in my root, so I had just copied over that one. Obviously that didn't impact the correct one - under 'includes'. doh.
Thanks for helping me determine the file that it was so I could isolate my idocy
 |
|
|
| Back to top |
|
 |
|
|