On Tue, Feb 9, 2010 at 7:10 PM, Eric Covener <cove...@gmail.com> wrote:

> On Tue, Feb 9, 2010 at 2:00 PM, Tiago Marques <tiago...@gmail.com> wrote:
> > Hi,
> > I'm trying to do 301 redirects from a website which used queries
> extensively
> > but doesn't use any now. I found this piece of code but it doesn't seem
> to
> > work.
> >>
> >> RewriteEngine on
> >>
> >> RewriteCond %{QUERY_STRING} ^id=13$
> >>
> >> RewriteRule ^/page.php$ http://www.example.com/newname.htm? [L,R=301]
> >
> > All the examples I found are very similar to this one but I can't get any
> of
> > them to work, it simply keeps the ?id=13 part and doesn't rewrite the
> url.
> > Am I doing anything wrong or has something changed from one mod_rewrite
> > revision to another?
>
> If it's not doing anything, maybe you put them in the wrong VirtualHost?
>
> If you put it in .htaccess, the RewriteRule will never match due to
> only matching a leading slash -- those are never present in
> per-directory context.  You'd also need to make sure AllowOverride was
> set for that Directory.
>
>
It was in the .htaccess. You were absolutely right, with the leading slash
removed it works great. I'm not using "AllowOverride" though, will I have
any problem because of it?
Thank you for helping out.

Best regards


>
> --
> Eric Covener
> cove...@gmail.com
>
> ---------------------------------------------------------------------
> The official User-To-User support forum of the Apache HTTP Server Project.
> See <URL:http://httpd.apache.org/userslist.html> for more info.
> To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org
>   "   from the digest: users-digest-unsubscr...@httpd.apache.org
> For additional commands, e-mail: users-h...@httpd.apache.org
>
>

Reply via email to