Mod_rewrite and Cakephp

I tried various methods to try to get this to work correctly (I don't accidentally know about mod_rewriting), but to no avail. If someone can point me in the right direction, I would really appreciate it!

I am trying to make several setup attempts that still appear with blank screens ...

Current configuration 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> 

folder cake / app / webroot:

 <IfModule mod_rewrite.c> RewriteEngine On RewriteBase / RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_FILENAME} !-f RewriteRule ^(.*)$ index.php?url=$1 [QSA,L] </IfModule> 

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> 

And again, any help is appreciated!

+4
source share
1 answer

If the rewrite rules were incorrect [syntax, etc.], you should get a 500 server error. Return to your log - make sure php is resetting errors and you should understand why you get a blank screen.

in php file.

 error_reporting(E_ALL); ini_set('display_errors', '1'); 

in .htaccess

 php_flag display_errors on 
+4
source

All Articles