【发布时间】:2017-01-30 11:10:59
【问题描述】:
我正在尝试删除 proxy.php 文件和传递给它的参数。这是目前的样子。
http://localhost/stuff/proxy.php?parameter=folder01/some.file
这是我想要的样子。
http://localhost/stuff/folder01/some.file
对于我的 htaccess 文件,我尝试了以下方法,但它们不起作用。
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ /proxy.php?parameter=$1 [L]
还有这个
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.+?)/?$ /proxy.php?parameter=$1 [L,QSA]
有什么想法吗?
【问题讨论】:
标签: .htaccess