我花了很多时间找出这个麻烦,我的cakephp在我的localhost服务器上运行,但是当我将cakephp移动到托管服务器时,cakephp只显示空白页面,任何人都在根目录中有代码.htaccess
文件夹,cakephp文件夹,还有另一个需要我的cakephp在服务器上运行?
我的cakephp版本是cakephp 3
我尝试过这段代码
在根.htaccess
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
在我的文件夹cakephp .htaccess
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteBase /my_app_name
RewriteRule ^$ webroot/ [L]
RewriteRule (.*) webroot/$1 [L]
</IfModule>
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ index.php?url=$1 [QSA,L]
</IfModule>
对于我读过的很多教程,他们说我们设置了3个.htaccess
文件,我的.htaccess
文件中是否有错误的代码,所以我无法访问我的网站?
[CASE CLOSED]
解决方案只是确保您的php已在您的托管/共享服务器中启用了intl