regexp modrewrite

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View

Im trying to use modrewrite and apply it to any address of the format:

but not applicable to:

What is the correct regexp for this pls, Im currently using /([^/]+)
and that grabs everything after the /


Re: regexp modrewrite

Quoted text here. Click to load it

modrewrite? Excuse my ignorance, but I've never heard of it.

Quoted text here. Click to load it

Why not
    (undef, $tail) = split (/\//, $URL, 2);
$tail now contains everything after the first slash.


Re: regexp modrewrite

marc wrote:

Quoted text here. Click to load it

This is better asked in alt.apache.configuration.  Anyway, the ([^/]+)
will indeed grab one or more character that's not a /, but you didn't
also add . to the char class.  Also, /([^/]+) doesn't seem to show how
far that match goes.  Is it /([^/]+)$  (ending the string $) or
something else?
Tim Greer, CEO/Founder/CTO,, Inc.
Shared Hosting, Reseller Hosting, Dedicated & Semi-Dedicated servers
and Custom Hosting.  24/7 support, 30 day guarantee, secure servers.
Industry's most experienced staff! -- Web Hosting With Muscle!

Site Timeline