Mailing List Archive


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [tlug] [OT] Creating user-friendly URLS with mod_rewrite/Apache



The quick-and-dirty way to do this would be just to tell Apache to use index.php for all not-found pages:

ErrorDocument 404 /index.php

...then have index.php look at $_SERVER['REQUEST_URI'] to see what URL the user was trying to go to and figure out what to do with it.

That way people uploading static HTML content should be unaffected by your various complicated server-side shenanigans, even if they decide that they don't want to put their static pages under /japanese any more.

(Make sure that if your index.php decides that the page doesn't exist, it actually sets a 404 header, as well as telling the user that it couldn't find the page...)

Home | Main Index | Thread Index

Home Page Mailing List Linux and Japan TLUG Members Links