[英]rewrite url using htacess
I have test project folder called "prj". 我有一个名为“ prj”的测试项目文件夹。 In that, I have one file called test.php.I want something like
在那儿,我有一个名为test.php的文件。
http://localhost/prj/test.php?t=123
should be rewritten like 应该改写成
http://localhost/prj/test.php
any help will be appreciated 任何帮助将不胜感激
Create a .htaccess file with: 使用以下命令创建一个.htaccess文件:
RewriteEngine on
RewriteRule ^prj\/test.php$ prj/test.php?t=123 [NC]
Edit 编辑
If your htaccess file is located in the prj folder: 如果您的htaccess文件位于prj文件夹中:
RewriteEngine on
RewriteRule ^test.php$ test.php?t=123 [NC]
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.