|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| ||||||||||||||||||||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Help with modrewrite rule
I'm trying to redirect an incorrect url to the correct one using
RewriteRule ^(.*)info/info(.*)$ $1info$2 [R] It doesn't seem to be picking it up. Example uri mydomain/info/info/foobar.html should redirect to mydomain/info/foobar.html What am I missing here? Thanks. |
|
#2
|
|||
|
|||
|
Hello,
How about this? Code:
RewriteRule ^(/?info)/info(/.*)?$ $1$2 [R] /info/info/foobar.html -> /info/foobar.html /info/info -> /info /info/info1 -> does not match Last edited by Sarah_S : June 2nd, 2009 at 01:45 PM. |
|
#3
|
|||
|
|||
|
Since the rule resided in the directory info I just needed to match from that directory. I was unaware of that. Also I needed to match more than just info/info but anything that traversed farther into info.
I used ^(.*?)/(.*)$ $1/$2 [R] Thanks for the input though. |
![]() |
| Viewing: Dev Shed Forums > System Administration > Apache Development > Help with modrewrite rule |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|