[英]Fastroute, htaccess and subfolders on windows
我有这个结构:
www/subfold
www/subfold/public/index.php
www/subfold/.htaccess
www/subfold/...etcetera
我正在使用wamp64。 我需要将所有请求重定向到public / index.php。
当我在www / subfold /上拥有index.php时,此.htaccess就像一个魅力。
Options -Indexes
RewriteEngine On
RewriteBase /subfold/
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . index.php [L]
我如何修改它以在subfold / public / index.php中工作?
用以下代码替换代码:
Options -Indexes
RewriteEngine On
RewriteBase /subfold/
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . public/index.php [L]
注意RewriteRule
中public/index.php
目标。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.