I have encoded my url text (ex: Ice's Bird) and pass it as a parameter to another file via htaccess redirection and the url appears as below.
http://test.com/nature-pic-Ice%26%23039%3Bs_bird.php
In the above url, I want the word Ice's bird as parameter, but I can g开发者_StackOverflowet only the word before single quote, ex: Ice
My redirection code is
RewriteCond %{REQUEST_URI} ^/nature-pic-(.*).php
RewriteRule ^nature-pic-(.*)\.php content.php?tpath=$1 [L]
How can I get the full word from the url?
this should be your .htaccess
RewriteEngine On
RewriteRule ^nature-pic-(.*).php test.php?tpath=$1 [L]
fully tested with this address nature-pic-Ice's_bird.php hope it will help
精彩评论