Hi, > From: Thaths <[EMAIL PROTECTED]> > On 3/10/06, Ajitabh Pandey <[EMAIL PROTECTED]> > wrote: > > The original URL where the pages are located is: > > > http://www.myserver.com/directory1/directory2/?s=ab&id=19 > > > > and I want this URL to be written as > > > http://www.myserver.com/directory1/virtdir/?s=ab&id=19 > > > The following are rules which I have written in > the > > .htaccess: > > > > RewriteEngine on > > RewriteBase /directory1/ > > RewriteRule ^virtdir$ virtdir/ [L,R] > > RewriteRule ^virtdir/$ directory2/?s=ab > > RewriteRule ^virtdir/(.*) directory2/$1 > > Shouldn't that read: > > RewriteEngine on > RewriteBase /directory1/ > RewriteRule ^directory2/(.+) /directory1/virtdir/$1 > [R,L]
Nope you reversed the order, the substitution is first and then the original URL. Anyways I gave it few trys and it worked as below: RewriteEngine on RewriteBase /directory1/ RewriteRule ^(virtdir)$ virtdir/?s=$1 [R,L] RewriteRule ^virtdir/(.*)$ dirctory2/$1 Thanks for replying. Cheers. Ajitabh Pandey __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com ------------------------------------------------------- This SF.Net email is sponsored by xPML, a groundbreaking scripting language that extends applications into web and mobile media. Attend the live webcast and join the prime developer group breaking into this new coding territory! http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642 _______________________________________________ linux-india-help mailing list linux-india-help@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linux-india-help