I have URL like this :
http://domain.net/news.php?url=/abcd.html
I need strip .php?url= to URL like this:
http://domain.net/news/abcd.html
Just tried :
RewriteRule ^news/(.*) news.php?url=$1 [L,QSA]
Put strtok in news.php :
$url=strtok($_SERVER["REQUEST_URI"],'?');
But it not work, in root folder, Drupal CMS running, that mean file index.php handle everything.
My .htaccess file here : http://pastebin.com/xktzt0yc
Please help!
If I understood correctly, your pattern and substitute is mixed. Have you tried to switch the pattern and substitute?
RewriteRule news.php?url=(.*) ^news/$1 [L,QSA]
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.