Regex to match a URL pattern for a htaccess file?

Think the other way around: If the url matches ^group/0-9+/. +, then it is a new group, so redirect these first (with a L rule). Everything else must be a old group, you can keep your old rules there.

That is one method I was pondering, but the reverse way just seemed cleaner with the other rules I have in the code. But, I may eventually have to cave in. Thanks.

– Derek Gathright Jul 18 '09 at 0:50 If you want to negate the pattern just prepend "! " like so:! ^group/0-9+/.

+ – Inshallah Jul 18 '09 at 5:11.

Your design choices make a pure-htaccess solution difficult, especially since group/123-another-old-group-456/a-module-inside-the-group/ is a valid old-style URL. I'd suggest a redirector script that looks at its arguments, determines if the first part is a valid groupid, and if so, it's a new-style URL takes the user to that group. Else, it is a old-style URL, so hand it off to old_group.php.

Something like this: RewriteRule ^group/(.*)$ /redirector. Php/$1 L,QSA.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions