apache - mod_rewrite and dot at END of URI -


i have been developing shop, uses mod_rewrite allow make uris more readable, instance:

http://www.example.com/shop/tools

will rewritten to

http://www.example.com/index.php?area=shop&folder=tools

my rewrite rule follows:

rewriterule ^shop/([^?#]+) index.php?area=shop&folder=$1 [nc,qsa,l]

however, breaks when folder name ends in . (dot), discovered when testing folder name ending in "etc."

it seems trailing dots totally removed before $_get has been populated. if put character after dot, it's fine, if uri ends in number of dots, removed

is there way stop happening?

you don't need exclude "?" , "#" in rewriterule since operates on uri (path), without query-string or anchor.

so, enough:

rewriterule ^shop/(.+) index.php?area=shop&folder=$1 [nc,qsa,l] 

that being said, not change fact dots stripped.

this may result of multiviews being on. option makes apache try , resolve uris disregarding extensions.

so, add well:

options -multiviews 

Comments

Popular posts from this blog

c# - How to get the current UAC mode -

postgresql - Lazarus + Postgres: incomplete startup packet -

javascript - Ajax jqXHR.status==0 fix error -