我正在尝试让我的.htaccess文件使用PHPDesktop,但是.htaccess似乎不起作用。我看到在settings.json文件中隐藏特定文件是可能的,但它似乎是非常有限的。是否有办法使用我的.htaccess文件而不是使用settings.json文件?下面是我在.htaccess文件中使用的内容:
RewriteEngine On
RewriteRule ^public/(.+) public/$1 [END] # allow direct access on public folder
RewriteRule ^ index.php [END] # anything else will be directed to index.php发布于 2019-05-07 19:46:07
不,您不能在PHP中使用.htaccess。PHP嵌入了一个不支持此类配置文件的Mongoose服务器。
可以通过将.htaccess文件中的web_server > 404_handler设置为/index.php来处理来自settings.json的重写规则。
https://stackoverflow.com/questions/56028231
复制相似问题