php - How to match spaces and ascii characters in .htaccess file -


i'm trying match special characters in .htaccess file id value can return page matching correct id value.

in mysql field text is: thelma & louise

before rewrite rule page address looked property data populating page www.site.com/movie.php?id=thelma+%26+louise

my rewriterule ^movie/([a-za-z0-9_-\s]+)/?$ /movie.php?id=$1

the url comes out page not found error

www.site.com/movie/thelma+%26+louise

how can match ascii characters page displayed.

thanks help!

the uri gets decoded before gets run through of rewrite rules, need match against space , ampersand &. pattern, ([a-za-z0-9_-\s]+) needs account symbols:

rewriterule ^movie/([a-za-z0-9_&+-\s]+)/?$ /movie.php?id=$1 [l,b] 

additionally, need use b flag grouped match $1 gets propery encoded in query string.


Comments

Popular posts from this blog

java - JavaFX 2 slider labelFormatter not being used -

Detect support for Shoutcast ICY MP3 without navigator.userAgent in Firefox? -

web - SVG not rendering properly in Firefox -