What phpBB mod is this?

  • Cibok
  • Beginner
  • Beginner
  • Cibok
  • Posts: 38

Post 3+ Months Ago

I have noticed that this forum uses html pages, like ftopic20734.html ..
Usually they are .php? Correct?

Is this a some sort of modification? And if so, where can i download it!
Thanks! :)
  • Anonymous
  • Bot
  • No Avatar
  • Posts: ?
  • Loc: Ozzuland
  • Status: Online

Post 3+ Months Ago

  • Axe
  • Genius
  • Genius
  • User avatar
  • Posts: 5739
  • Loc: Sub-level 28

Post 3+ Months Ago

These are PHP too, it's simply a search-engine-friendly URLs modification using mod_rewrite. Many dynamic sites use it to make their URLs more pleasing to Google's eye (and other search engines).

Hit google, and look for "mod_rewrite", and "search engine friendly URLs" (with or without the quotes).
  • Cibok
  • Beginner
  • Beginner
  • Cibok
  • Posts: 38

Post 3+ Months Ago

Ok Thanks!
Lemme see if I can find something :)
  • rjmthezonenet
  • Expert
  • Expert
  • User avatar
  • Posts: 526
  • Loc: St. John's, Newfoundland, Canada

Post 3+ Months Ago

Interesting... Axe, have you come across anything suggesting that this is necessary for common search engines? PHP is a well known file extension. Besides, wouldn't the ? and & characters trip a trigger?

What's the diff between doing mod_rewrite or AddType application/x-httpd-php .html ? (I'm guessing it boils down to how many non-PHP files you'll be stuck parsing vs. mod_rewrite overhead.)
  • Axe
  • Genius
  • Genius
  • User avatar
  • Posts: 5739
  • Loc: Sub-level 28

Post 3+ Months Ago

The & and ? characters apparently used to play hell with search engines, and mess up their stuff, but most of them (at least, the ones that matter - Google) get over this...

The problem is, Google still likes .html over .php?something=1&somethingelse=2&theother=3

Apparently having a shorter URL does count for something, heh.

Google will see them, but it doesn't rate them as highly. Here's an example I posted in another thread...

http://www.google.com/search?hl=en&lr=&ie=UTF-8&oe=UTF-8&q=allinurl%3Awww.reptilerooms.com+chat

That's the URL to search on Google for the chat page on my site.

Now, both of those URLs are identical (as far as my Apache is concerned). It translates the faked out .html address into the real address and sends the page down.

But, In the google listing there, you can see it shows "Chat-main.html" above "index.php?module=Chat&func=main", and if you actually go to those URLs and look at the PR in the Google toolbar...

Chat-main.html is 5/10
index.php?module=Chat&func=main is 4/10

And the content on both is identical. So that's the main reason I've decided to go for it.

As far as using a HTML extension over a PHP extension on the fake URLs, my main reason was for practicality. All my files DO end in .php, I don't want to accidentally create a .php file that produces a URL that would forward to something else.

If I created a page, "Chat-main.html", where would my system send the browser? Would it send them to the REAL file "Chat-main.html", or would it send them to "index.php?module=Chat&func=main"?

So, I don't know if Google does rate .html higher than .php without any actual parameters on the URL, but personally, I use it simply to easier separate fact from fiction. If all the fake URLs end in .html, and there's a problem, I can instantly see it's an error with the fake URL presentation. If I see an error directly related to a .php file, I know it's an actual php file I need to start looking at.

The main difference of using mod_rewrite is to eliminate all the extra parameters on the URL. It doesn't matter whether you do set .html files to parse for PHP code or not. Even if it's set, "index.php?module=Chat&func=main" would simply become "index.html?module=Chat&func=main".

So, mod_rewrite TOTALLY fakes the URL to eliminate the parameters (or at least the & and ? characters of the URL) to make it look like a regular static page - it's not just a different file extension.
  • rjmthezonenet
  • Expert
  • Expert
  • User avatar
  • Posts: 526
  • Loc: St. John's, Newfoundland, Canada

Post 3+ Months Ago

Two great uses for mod_rewrite: shorter URLs and Google favourtism. Thank you Axe, that was a great post.
  • Axe
  • Genius
  • Genius
  • User avatar
  • Posts: 5739
  • Loc: Sub-level 28

Post 3+ Months Ago

You're welcome. It took me a LOT of reading to get it all figured out (I hadn't really played around much with regexp n' stuff to get the script to send out the fake URLs instead of the real ones), but it got there in the end.

Now, that's the first thing I attempt to get working on new sites I design with scripts that have dynamic URLs (like PostNuke/osCommerce/Forums/etc.)
  • rjmthezonenet
  • Expert
  • Expert
  • User avatar
  • Posts: 526
  • Loc: St. John's, Newfoundland, Canada

Post 3+ Months Ago

regexp's are the cats ass! I fixed over 400 pages last week which my first real attempt at a back-referencing ditty. Maybe its time to buy that 40lbs regexp book after all!

Well, here's a zillion participation points for getting me into mod_rewrite. :-)
  • Axe
  • Genius
  • Genius
  • User avatar
  • Posts: 5739
  • Loc: Sub-level 28

Post 3+ Months Ago

Thanks buddy :)

If you need a hand, let me know, I've got bunches of URLs in my favourites showing various methods of implementing this - most of them are specifically for PostNuke, but they give you the general principles.

It's definitely a very handy feature :)

Post Information

  • Total Posts in this topic: 9 posts
  • Users browsing this forum: No registered users and 10 guests
  • You cannot post new topics in this forum
  • You cannot reply to topics in this forum
  • You cannot edit your posts in this forum
  • You cannot delete your posts in this forum
  • You cannot post attachments in this forum
 
 

© 1998-2014. Ozzu® is a registered trademark of Unmelted, LLC.