0
當我試圖打我的網站時,我在mydomain.com/subfolder
處得到404(來自Apache)。在1and1上查看CakePHP 3應用程序時出現404錯誤
/subfolder/.htaccess
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteRule ^$ webroot/ [L]
RewriteRule (.*) webroot/$1 [L]
</IfModule>
/subfolder/webroot/.htaccess
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule^index.php [L]
</IfModule>
要確認mod_rewrite
作品,我在/subfolder/.htaccess
文件,及時添加重定向此:
Redirect 301/http://other-domain-owned.com/
所以,.htaccess
現場和mod_rewrite
工程。
在我的開發環境中,我可以通過Directory
指令通過針對該文件夾的symply啓用.htaccess
文件使該網站在同一個/subfolder
中工作。
一些教程說要添加RewriteBase /
但這沒有幫助。
工作。謝謝! – TekiusFanatikus