[英]Modify the URL through an .htaccess file
I have a URL which looks like 我有一个看起来像的URL
localhost/myapp/index.php?mod=user&page=createuser
I want the URL to look like 我希望URL看起来像
localhost/user/createuser
How do I do this with a htaccess file? 如何使用htaccess文件执行此操作?
RewriteEngine On
RewriteRule ^([^/]*)/([^/]*)$ /myapp/index.php?mod=$1&page=$2 [L]
Try this 尝试这个
RewriteEngine on
RewriteRule ^myapp/(.+)/(.*) myapp/index.php?mod=$1&page=$2 [L]
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.