简体   繁体   English

.htaccess重写规则,不带参数的php文件

[英].htaccess rewrite rule without parameter for php file

Something is wrong in my htaccess file , i want a simple rewrite rule for login.php,change login.php into l13.I wrote htaccess rewrite rule like as 我的htaccess文件中出了点问题,我想要一个简单的login.php重写规则,将login.php更改为l13。我写了htaccess重写规则,如下所示

RewriteEngine ON
RewriteRule ^l13     login.php

but l13 is not working instead of login.php 但是l13不起作用而不是login.php

Tried this, works for me: 试过这个,对我有用:

RewriteRule ^l13(/?)$     login.php [L]

Make sure that mod_rewrite is enabled, and [L] is required to stop evaluating other rules (in case you have more of them below) 确保启用了mod_rewrite,并且需要[L]才能停止评估其他规则(以防您在下面有更多规则)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM