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:


Uncomment the App.baseUrl line from core file :

File location : /app/Config/core.php

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

Virtual Host configuration for windows operating system ( XAMPP SERVER )

Virtual Host configuration for windows operating system ( XAMPP SERVER ).

1. Open the file hosts from ( C:\Windows\System32\drivers\etc\hosts )

2. Then open the httpd-vhosts.conf for xampp server from (  C:\xampp\apache\conf\extra\httpd-vhosts.conf )

# Be sure to only have this line once in your configuration
    DocumentRoot C:/xampp/htdocs/
    ServerName localhost
    ServerAdmin admin@localhost

# This is the configuration for
<VirtualHost *:80>
    DocumentRoot "C:\wamp\www\project_dir"
    DirectoryIndex index.php
    <Directory C:/wamp/www/>
      Order Deny,Allow   
      Allow from all