Simple mod_rewrite Question

Posted by user5358 on Pro Webmasters See other posts from Pro Webmasters or by user5358
Published on 2011-02-12T04:33:02Z Indexed on 2011/02/12 7:33 UTC
Read the original article Hit count: 184

Filed under:
|

Hello,

I want to have everything that looks like this:

/1/2/3/4/5/[...]

to redirect to this:

/index.php?u=/1/2/3/4/5/[...]

unless the requested string is a specific file. So anything that doesn't have a ".", I want to redirect to "index.php?u=[...]". I'll then parse the URI segments in PHP to determine what the user is requesting.

I've been looking around for how to do this, but have only a very rough understanding of regular expressions and have been unable to find an example of how to do it.

Thanks!

© Pro Webmasters or respective owner

Related posts about apache

Related posts about mod-rewrite