Get QueryString and redirect with .htaccess [duplicate]

0

I would like to get to the URL of querystring: url.htm and direct with htaccess. I'm almost succeeding:

RewriteRule ^([A-Za-z-]+)\.htm$ conteudo.php?url=$1&%{QUERY_STRING} [qsappend]
RewriteRule ^conteudo.php(.*)$ http://meusite.com/nova-url-%1? [R=301,L]

Ex:

Paste the URL

www.meusite.com/url.htm

and play to

www.meusite.com/nova-url-url.htm

But with this .htaccess it does so:

Result: www.meusite.com/nova-url-

Does not return url.htm

That's all I need to finish.

    
asked by anonymous 20.05.2015 / 02:24

1 answer

1

Replacement is wrong in:

RewriteRule ^conteudo.php(.*)$ http://meusite.com/nova-url-%1? [R=301,L]

The %1? should be $1

    
20.05.2015 / 14:10