httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Robert Ionescu <>
Subject Re: [users@httpd] mod_rewrite
Date Wed, 24 May 2006 18:30:58 GMT
Bob Smith wrote:
> I'm trying to remove two directories from the path of a website, but I just
> can't seem to get the mod_rewrite syntax right.
> I have a url coming in with a url like
> And I'm trying to redirect it to

Are your directories constants? Or are they some kind variable?

To force such an external redirect, you could use in your httpd.conf

RewriteRule ^/directoryone/directorytwo/(mypage\.php)$ /$1 [R=301,L]


The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:> for more info.
To unsubscribe, e-mail:
   "   from the digest:
For additional commands, e-mail:

View raw message