Mod_rewrite and Cakephp
I have tried various methods to try and get this working correctly (I am not by any chance knowledgable about mod_rewriting) but to no avail. If anyone can point me in the right direction I would greatly appreciate it!
I am after trying several different configuration attempt still coming up with blank screens...
The current config is below:
cake folder:
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteRule ^$ app/webroot/ [L]
RewriteRule (.*) app/webroot/$1 [L]
</IfModule>
cake/app folder:
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteRule ^$ webroot/ [L]
RewriteRule (.*) webroot/$1开发者_高级运维 [L]
</IfModule>
cake/app/webroot folder:
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ index.php?url=$1 [QSA,L]
</IfModule>
The httpd.conf:
<VirtualHost 180.180.180.180:80>
# ServerAdmin webmaster@dummy-host.example.com
DocumentRoot /var/www/html/cake
ServerName something.something.com
# ErrorLog logs/dummy-host.example.com-error_log
# CustomLog logs/dummy-host.example.com-access_log common
<Directory "/var/www/html/membersarea">
Options Indexes FollowSymLinks MultiViews
AllowOverride All
Order deny,allow
Allow from all
</Directory>
</VirtualHost>
Once again, any and all help is appreciated!
If the rewrite rules were incorrect [syntax etc] you should be getting a server 500 error. Turn back on your logging - make sure php is dumping errors & you should see why you are getting a blank screen.
in an php file.
error_reporting(E_ALL);
ini_set('display_errors', '1');
in an .htaccess
php_flag display_errors on
精彩评论