Forum Moderators: phranque

Message Too Old, No Replies

Rewrite Rule

         

Jordo

10:51 pm on Oct 9, 2004 (gmt 0)



I hope someone can help me with this...

Using apache rewrite_mod I need to have a rewrite rule that will do the following:

if an URL contains this pattern es/en/SOMENAME
to change it to just /SOMENAME
Basically remove the es/en and leave /SOMENAME as the URL

So if someone knows what the rewrite should be in the vhost.conf file,
I would really appreciate it.

Thanks,
Jordo

SkyDog

12:43 am on Oct 10, 2004 (gmt 0)

10+ Year Member



RewriteEngine On
RewriteRule ^/es/en/(.*) /$1 [L]

If you're just doing this because pages have moved you should probably use mod_alias:

RedirectMatch 301 ^/es/en/(.*) [mysite.com...]