The requested url is http://localhost/views/items?item=abc I want to rewrite it to http://localhost/views/myfile.php?reqtype=items&item=abc please note that the last keyword of url before query items I want to move to query section as reqtype=items to get this I wrote below code in .htaccess
RewriteEngine On RewriteCond %{QUERY_STRING} ^(.*)$ RewriteRule ^views/(.*)$ views/myfile.php?reqtype=$1&%1 [L,NE] This code is working well when I tests here verified its output (from this link) by directly pasting in browser as URL worked well. but with xampp (my version is 7.1.28) it is not working. Remember url-rewriting is working for other type of conditions ( means apache configuration is correct and working ) but this particular example is not working, Any solution will be appreciated, Thanks.
https://stackoverflow.com/questions/65446822/url-not-re-writing-as-expected-in-apache-xampp December 25, 2020 at 05:22PM
没有评论:
发表评论