URL rewriting working but page not found?

phpBB3 SEO Simple mod Rewrite support forum. This mods performs URL rewriting for phpBB3 in a static way.

Moderator: Moderators

URL rewriting working but page not found?

Postby demonfatal » Mon Feb 10, 2014 6:25 pm

Hello,
I checked 2 time my installation and all is fine but when I turn ON the simple mode I get this error when I try to click on a link:

Not Found

The requested URL /phpBB322/topic15122.html was not found on this server.


Please I need your help to find what is wrong...

Thanks.
Last edited by demonfatal on Mon Feb 10, 2014 7:16 pm, edited 1 time in total.
demonfatal
 
Posts: 7
Joined: Mon Feb 10, 2014 6:19 pm

Advertisement

Re: URL rewriting working but page not found?

Postby HB » Mon Feb 10, 2014 7:01 pm

That usually means that the Apache mod_rewrite isn't working. It may not be enabled, or the .htaccess file is inaccessible (e.g., permissions error). Did you check the HTTP logs? Try something simple in .htaccess with static html. Does it work?

RewriteEngine on
RewriteRule ^foo\.html$ bar.html

foo.html should not exist, bar.html should exist. If you enter <yoursite>/foo.html, does the content of bar.html display? See this reference for more examples:

http://httpd.apache.org/docs/2.0/misc/rewriteguide.html
Dan Kehn
HB
phpBB SEO Team
phpBB SEO Team
 
Posts: 1510
Joined: Mon Oct 16, 2006 2:25 am

Re: URL rewriting working but page not found?

Postby demonfatal » Mon Feb 10, 2014 7:17 pm

Well, I am not able to get your example working, so I will made some test and keep you updated.

Thanks for your reply.
demonfatal
 
Posts: 7
Joined: Mon Feb 10, 2014 6:19 pm

Re: URL rewriting working but page not found?

Postby demonfatal » Mon Feb 10, 2014 10:13 pm

I finally found the issue: AllowOverride was set to None in Apache configuration file...

Now just a last question please, I am using a MOD called: "Top Stats 1.0.10" (https://www.phpbb.com/customise/db/mod/top_stats/)
The links are not rewritten...
Instead to get "the-name-t10706.html, I get "topic10706.html"

Do you have an idea to get the URL rewritten as the forum links?

Thanks.
demonfatal
 
Posts: 7
Joined: Mon Feb 10, 2014 6:19 pm

Re: URL rewriting working but page not found?

Postby HB » Tue Feb 11, 2014 6:38 pm

Once you take the time to understand how the phpBB-SEO mod works, adapting any other mod is fairly straightforward. In a nutshell, the phpBB-SEO mod relies on the fact that EVERY SINGLE phpBB URL passes through the append_sid(...) call. Given that fact, the mod stuffs the mapping of topic IDs and forum IDs and whatnot into the $phpBB_seo global variable in a given php file like viewtopic.php, viewforum.php, index.php, etc. which is later referenced by the modifications in append_sid(...). To phpBB-SEO enable a mod, you must find where it already retrieves topic IDs and forum IDs and add the code that stuffs the results into $phpBB_seo so append_sid(...) can do the remapping.

As a historical note, technically the phpBB-SEO mod could be greatly simplified by adding a few SQL statements to append_sid; the problem with that approach is that the number of SQL invocations could be huge. By lightly modifying EXISTING queries already present in viewtopic.php, viewforum.php, etc., there's no performance penalty at all for phpBB-SEO.

Now that I've covered the why, here's some examples of how:

[solved] NV recent topics (1.0.5) and Ultimate SEO URL
Problem with NV Recent Post
display topics on external page

Be aware that some of the threads above were written before some restructuring of the phpBB-SEO code, so the "code pattern" may not match precisely. A better reference, if you study a bit, is the core changes in viewtopic.php and viewforum.php. Your updates to a mod should be almost identical to one of these, the main difference being that you may have to add a parameter to the SQL query (e.g., to fetch the thread topic title) if it wasn't already present.

(And no, I won't write it for you; but http://www.typo-it.com/ will probably do it for a fee).
Dan Kehn
HB
phpBB SEO Team
phpBB SEO Team
 
Posts: 1510
Joined: Mon Oct 16, 2006 2:25 am


Return to Simple SEO URL

 


  • Related topics
    Replies
    Views
    Last post

Who is online

Users browsing this forum: No registered users and 4 guests