Rewrite Topics

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

Moderator: Moderators

Rewrite Topics

Postby CThomas » Wed Nov 20, 2013 9:51 pm

I have gotten the URL rewriting to work with all of the forums I created but I am having a problem with the topic URL being rewritten.

This is the Main Forums Page and you can see that all of the forums are rewritten just fine, but when you open one you will see a topic listed that has the address of: -http://website-startup.com/forums/topic31.html
But when you click on it and it is open, you can hover over the header link and it will have the address of -http://website-startup.com/forums/updating-wordpress-to-3-7-1-t31.html which is the exact same page.
I am trying to get the latter address to be the standard and I have not been able to figure out how to do this after searching for 2 days straight. I am trying to do this for my sitemap so that it will be SEO friendly.
Any help would be greatly appreciated.

Thank you,
Chris
CThomas
 
Posts: 4
Joined: Wed Nov 20, 2013 9:35 pm

Advertisement

Re: Rewrite Topics

Postby HB » Thu Nov 21, 2013 1:16 am

It sounds like you want "advanced" mode for URL rewriting, but you selected "mixed". See ACP > PHPBB SEO > phpBB SEO Class settings > URL rewriting type. Note: phpBB-SEO caches the calculated topic URL in the topics table. You can set that column to null and it will recalculate it next time, or you can run the phpbb_seo/sync_url.php to force a recalculation for all URLs.
Dan Kehn
HB
phpBB SEO Team
phpBB SEO Team
 
Posts: 1504
Joined: Mon Oct 16, 2006 2:25 am

Re: Rewrite Topics

Postby CThomas » Thu Nov 21, 2013 6:04 pm

Thank you for your prompt reply! I do have the URL rewriting type set to Advanced (I tried all 3 out of desperation) and I also did the syncing but the issue remains. Here are my current settings:

Activate URL rewriting: YES
URL rewriting type: Advanced
Activate SQL Rewriting: No
Profiles and groups injection: No
Virtual folder Profiles: No
Profiles ID removing: No
Common Search and User messages pages rewriting: No
Attachment Rewriting: No
SID Removing: No
Highlights Removing: No
Remove small words: No
Virtual Folder: No
Virtual Root: No
Forum URL caching: Yes
Forum ID Removing: Yes

phpBB SEO No Duplicate-I installed this in hopes that it would help resolve the issue, but it did not.
Activate The No duplicate: No

Yesterday, I activated the SQL Rewriting and it gave me a link to the phpbb_seo/sync_url.php page where I tried to reset all topic URLs and then syncing, but nothing seemed to work. You mentioned:
Note: phpBB-SEO caches the calculated topic URL in the topics table. You can set that column to null and it will recalculate it next time, or you can run the phpbb_seo/sync_url.php to force a recalculation for all URLs.

Set that column to null? Would you please explain further? This is all very new to me and that threw me. Is this in the phpMyAdmin or somewhere in the ACP? I found a table in the phpMyAdmin phpbb3_topics and I viewed it and it showed the correct URLs, but I wasn't sure what to do.
I really appreciate all of your help. Thank you.
CThomas
 
Posts: 4
Joined: Wed Nov 20, 2013 9:35 pm

Re: Rewrite Topics

Postby HB » Fri Nov 22, 2013 3:52 pm

I would enable SQL Rewriting. It will then save the calculated URL in phpbb_topics. The page looks correct to me, e.g.,

http://website-startup.com/forums/topic31.html

That's shown by viewforum.php, but viewtopic.php shows:

http://website-startup.com/forums/updat ... 1-t31.html

And it leads to the same place. Did you start with the premod? If not, maybe you missed part of the updates in viewforum.php and other files. For example, the overall_header.html should have this line:

<!-- IF SEO_CANONICAL_URL --><link rel="canonical" href="{SEO_CANONICAL_URL}" /><!-- ENDIF -->

I don't see the canonical URL in the resultant page. As a double-check, maybe you should install the premod in another folder or a test server to see what is different. How to set up a local server using xampp

CThomas wrote:Set that column to null? Would you please explain further? This is all very new to me and that threw me. Is this in the phpMyAdmin or somewhere in the ACP? I found a table in the phpMyAdmin phpbb3_topics and I viewed it and it showed the correct URLs, but I wasn't sure what to do.

From phpMyAdmin, you'd do something like "update phpbb3_topics set topic_url = null". That would force the phpBB-SEO code to recalculate (basically the same thing the sync.php routine does).
Dan Kehn
HB
phpBB SEO Team
phpBB SEO Team
 
Posts: 1504
Joined: Mon Oct 16, 2006 2:25 am

Re: Rewrite Topics

Postby CThomas » Sat Nov 23, 2013 5:36 pm

That is what I am trying to accomplish: To get the viewforum.php to match the viewtopic.php URL. Should I copy the added code over? Or will that break everything?

No, I did not start with the premod, I wasn't aware of it until your mention of it...

As for the overall_header.html which should have this line:

<!-- IF SEO_CANONICAL_URL --><link rel="canonical" href="{SEO_CANONICAL_URL}" /><!-- ENDIF -->


Where do I place it? I foolishly tried to uninstall the mod and then reinstall. That led to bigger issues. Although I did back everything up, when I copied everything back over, it now says that the mod is in the uninstalled mods and it will not let me install it: The MOD is missing an action matching the find ‘<a href="#p{postrow.POST_ID}">’
I manually reinstalled and got no errors, but nothing has changed and the mod is still not in the Installed mods section.

I will try the premod this weekend on a local install. Hopefully, it will get me somewhere.
Thank you again for your help. I really do appreciate it!
CThomas
 
Posts: 4
Joined: Wed Nov 20, 2013 9:35 pm

Re: Rewrite Topics

Postby CThomas » Wed Nov 27, 2013 6:10 pm

After setting up a virtual server, I did a fresh install to see what would happen. Both good and bad became of it. For some reason, with the old install, I was able to use the American English language pack with no problem. Now, when I install it, it messes up my ACP and has the AUTOMOD and PHPBB SEO tabs as their code names (such as ACP_PHPBB_SEO) and all of the menu links in the tabs are in the same naming format.
But, it did fix the Topic Rewriting as I wanted. The rest is just cosmetic, so I won't worry about it too much.
I ended up installing and upgrading several times before realizing that it was the language pack that was doing that. I know that there was more to it all than this, but I'm getting over the flu and am still hazy from the medicine.
I just wanted to thank you again for pointing me in the right direction. It was all due to a bad install and I didn't catch the error.
CThomas
 
Posts: 4
Joined: Wed Nov 20, 2013 9:35 pm


Return to phpBB2 mod Rewrite

 


  • Related topics
    Replies
    Views
    Last post

Who is online

Users browsing this forum: No registered users and 4 guests