我刚刚了解他们,我有简单的重写规则
RewriteEngine On RewriteRule ^dl/(.*)/.*$ dl/$1/index.php [L] RewriteRule ^index.php$ upload.js [L]
这两个工作都在Windows的url localhost/upload/dl/mkdji/index.php ,但在Debian上只有www.domain.com/index.php第二条规则,而不是www.domain.com/dl/oksoks/index.php dl是一些随机string。 很明显,我错过了关于目录深度的东西,但不知道是什么。 文件htacces在localhost/upload和domain.com文件夹的根。 我在这里错过了什么?
可能你需要RewriteBase指令。 例如:
RewriteBase /