2018-04-05 18:07
浏览 69


I would like to change my URL from to I am using a .htaccess rewrite rule in attempt to achieve this.

However, upon browsing to my /functions/analyze/password/test I can see that the GET parameter being passed is test.php/password/test and not test.

Where am I going wrong?

# Enable editing.
Options -MultiViews
RewriteEngine On

# Hide PHP extenstion.
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME}\.php -f
RewriteRule ^(.*)$ $1.php

# Reroutes for GET.
RewriteRule ^(functions/analyze)/(password)/(.+)$ $1.php?$2=$3 [L,NC,QSA]

图片转代码服务由CSDN问答提供 功能建议

我想从更改我的网址 。 我正在使用.htaccess重写规则来尝试实现此目的。

但是,在浏览到我的 / functions / analyze / password / test 后,我可以看到 传递的GET参数是 test.php / password / test 而不是 test


Options -MultiViews 
RewriteEngine On 
RewriteEngine on 
RewriteCond%{REQUEST_FILENAME}  \ .php -f 
RewriteRule ^(。*)$ $ 1.php 
RewriteRule ^(函数/分析)/(密码)/(。+)$ $ 1.php?$ 2 = $ 3  [L,NC,QSA] 
  • 写回答
  • 好问题 提建议
  • 追加酬金
  • 关注问题
  • 邀请回答

2条回答 默认 最新

相关推荐 更多相似问题