Author Topic: Fall back / friendly url  (Read 4528 times)

Offline Xagone

  • Posts: 482
  • Gender: Male
  • Developper
    • Xagone Inc
Fall back / friendly url
« on: October 22, 2010, 02:14:53 PM »
Situation : a webhosting as some security that prevent to run selfmade php, so when WB makes a new page / news, the page come out blank

My Solution : having a fallback position and not allowing WB to make files!

Note: all thoses mods have been made in WB 2.8.1 rev .1308

To create a fallback system we need htaccess, in that htaccess you add your fallback code like this :
Code:
Only registered users can see contents. Please click here to Register or Login.what it does, it's rewriting the internal url persive by apache if the url asked is not a file or folder (also catches 404 pages)

now I need to mod index.php
so, in the index, just after this code :
Code:
Only registered users can see contents. Please click here to Register or Login.i've install this code :
Code:
Only registered users can see contents. Please click here to Register or Login.
this is working as a fallback for normal pages, and news, i'll continue later to make WB continue without error if pages are not written.

But before I continue let me state the pros and cons of this (and why it should be in the dev) :

Pros :
- Pages folder is irrelevent, you can now do what you want with it
- Pages extensions also are irrelevent, you can make any extension you want or get rid of it alltogether.
- Make for more SEO friendly url possible
- Works on IIS if the server is using ISAPI_Rewrite (the httpd.ini part is almost identical as htaccess)
- Properly sends 404 header code so metacrawlers do not bother coming back to this page.

Cons :
- Works only with systems pages and news post, some modules using physical files will not works
Xagone Inc. (formerly VotreEspace)
http://xagone.com/

 

postern-length