CakePHP application run without mod_rewrite activation on server


Some shared server can not provide to read/write .htaccess file for which cakephp application can not run properly on those server. here is the simple solution to overcome these situation. just follow the below steps to make it workable on any server.

To configure CakePHP *not* to use mod_rewrite and to use CakePHP pretty URLs, remove these .htaccess files:


   /.htaccess
   /app/.htaccess
   /app/webroot/.htaccess
 

Uncomment the App.baseUrl line from core file :

File location : /app/Config/core.php


   Configure::write('App.baseUrl', env('SCRIPT_NAME'));
 
Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s