| :: |
| Author |
Message |
Illuminati
Joined: 31 Jul 2007 Posts: 2
|
Posted: Tue Jul 31, 2007 6:21 pm Post subject: Redirect from link in email does not work with SEO mod |
|
|
I had to make a simple tweak in the viewtopic.php file in order to get the link in the email you get when you are subscribed to a topic that gets a reply.
*Note: I have tweaked the way this advanced mod creates my URLs to match the mod we were using with PHPBB2... so that's why there are not any titles in the url.
Here is the format of the URL that is sent in the email:
-http://forums.domain.com/viewtopic.php?f=49&t=10579&p=77038&e=77038
Here is what the url was getting re-written to:
-http://forums.domain.com/about10579.html&p=77038
This URL results in a 'File not found' error.
Here is what I did to fix it... although there would probably be some side effects for the typical advanced mod re-write users... but it happens to work for because of how we have changed the url format from the default title behavior...
Open: viewtopic.php
Find:
| Code: | | redirect($redirect_url . ((!$post_id) ? "&p=$jump_to" : "&p=$post_id") . "#p$jump_to"); |
Replace with:
| Code: | | redirect(((!$post_id) ? $redirect_url . "&p=$jump_to" : append_sid("{$phpbb_root_path}viewtopic.$phpEx", "p=$post_id")) . "#p$jump_to"); |
This way the post_id is included in the evaluation for the re-writen URL and the URL that is output is:
-http://forums.domain.com/post77038.html#p77038
Again, after looking at the code a little closer, this exact fix may not work for you, but it does for my situation... Not sure if this is something that could be included as a bug fix for the advanced SEO mod, but at the least, I hope it will help someone else. |
|
|
| Back to top |
|
 |
|
 |
dcz Administrateur - Site Admin

Joined: 28 Apr 2006 Posts: 15242
|
|
| Back to top |
|
 |
TomaS PR2

Joined: 08 Jun 2007 Posts: 226
|
|
| Back to top |
|
 |
SeO Administrateur - Site Admin

Joined: 15 Mar 2006 Posts: 4006
|
|
| Back to top |
|
 |
TomaS PR2

Joined: 08 Jun 2007 Posts: 226
|
|
| Back to top |
|
 |
dcz Administrateur - Site Admin

Joined: 28 Apr 2006 Posts: 15242
|
|
| Back to top |
|
 |
tweety PR0

Joined: 24 Jan 2007 Posts: 94
|
Posted: Wed Aug 15, 2007 10:52 pm Post subject: Re: Redirect from link in email does not work with SEO mod |
|
|
| dcz will this update be for just phpbb3 or phpbb2 version also |
|
|
| Back to top |
|
 |
SeO Administrateur - Site Admin

Joined: 15 Mar 2006 Posts: 4006
|
|
| Back to top |
|
 |
Illuminati
Joined: 31 Jul 2007 Posts: 2
|
Posted: Thu Aug 16, 2007 12:45 pm Post subject: Re: Redirect from link in email does not work with SEO mod |
|
|
| Thanks for adding this to the next release! |
|
|
| Back to top |
|
 |
HB phpBB SEO Team

Joined: 16 Oct 2006 Posts: 831
|
Posted: Fri Aug 17, 2007 3:12 am Post subject: Re: Redirect from link in email does not work with SEO mod |
|
|
| SeO wrote: | | phpBB3 this time. We'll see about phpBB2, it's possible that we back-port some of the great new feature developed for phpBB3. |
I'm in no rush to migrate my heavily modified board to a new release of phpBB and would welcome a V2 compatible version. If history is an indicator, it may be a year or more before V3 really takes hold. I prefer to sit out the first round while others crash on the rocky shores.  |
_________________ Dan Kehn |
|
| Back to top |
|
 |
tweety PR0

Joined: 24 Jan 2007 Posts: 94
|
Posted: Sat Aug 25, 2007 4:17 pm Post subject: Re: Redirect from link in email does not work with SEO mod |
|
|
| same here |
|
|
| Back to top |
|
 |
|
|