php - htaccess rewrite specific parameter with dot -
i have issue rewrite url like:
http://examplepage.com/news/?aid=n_557eb95ed07360.45147988
to
http://examplepage.com/some-other-name
but needs url if parameter changes should nothing. think problem dot in parameter?
my current .htaccess matter this:
rewritecond %{query_string} ^aid=n_557eb95ed07360.45147988$ rewriterule ^news/$ /some-other-url [nc,l]
any appreciated. thanks.
as drakes said, adding escape dot should trick.
rewritecond %{query_string} ^aid=n_557eb95ed07360\.45147988$ rewriterule ^news/$ /some-other-url [nc,l]
or, if aid
going dynamic, can use:
rewritecond %{query_string} ^aid=(.*)$
and if want search aid
part of query:
rewritecond %{query_string} !(^|&)aid=(.*)$
Comments
Post a Comment