Godaddy主机空间CakePHP .htaccess编写方法
CakePHP的框架默认的.htaccess不能完美支持Godaddy主机空间。也不是Godaddy空间的Htaccess有问题,而是我们没有写好.htaccess。您可以参考如下代码来配置您的CakePHP项目。
Godaddy主机CakePHP项目主目录.htaccess
- <IfModule mod_rewrite.c>
- RewriteEngine on
- RewriteBase /
- RewriteRule ^$ app/webroot/ [L]
- RewriteRule (.*) app/webroot/$1 [L]
- </IfModule>
Godaddy主机CakePHP项目App目录.htaccess
- <IfModule mod_rewrite.c>
- RewriteEngine on
- RewriteBase /
- RewriteRule ^$ webroot/ [L]
- RewriteRule (.*) webroot/$1 [L]
- </IfModule>
Godaddy主机CakePHP项目webroot .htaccess
- <IfModule mod_rewrite.c>
- RewriteEngine On
- RewriteBase /
- RewriteCond %{REQUEST_FILENAME} !-d
- RewriteCond %{REQUEST_FILENAME} !-f
- RewriteRule ^(.*)$ /index.php?url=$1 [QSA,L]
- </IfModule>
相关文章导读
文章评论
评论表单
0 回复 for "Godaddy主机空间CakePHP .htaccess编写方法"
phplamp - 2010-03-13
您好,您的评论将出现在这里!
