Ketan Patel    29-Jul-2013

You are reading this post which means you are facing the error of “URL rewriting" when Installing CakePHP on Localhost Wamp. Without solving this error, you cant go ahead.

URL rewriting is not properly configured on your server

To solve this issue you need to make some changes in the httpd.conf file of the apache server. If you are using a wamp server, you can access the httpd.conf file as bellow:

URL rewriting is not properly configured on your server

If you are using the XAMPP server then, you can found httpd.conf file in the xampp/apache/conf/httpd.conf. For any other apache based server config file can be found in apache/conf/httpd.conf

Once you open the config file, you can find a line like #LoadModule rewrite_module modules/mod_rewrite.so. See the image below:

enable mod_rewrite

Just remove # in that line in the httpd.conf file. then save & restart the Apache Server. The problem must be solved. If not then make sure that the code written in apache/conf/extra/httpd-vhosts.conf file is like the code given below:

<VirtualHost *:80>
    ServerAdmin admin@localhost
    DocumentRoot "c:/wamp/www/"
    ServerName localhost
</VirtualHost>

<Directory "c:/wamp/www/">
    Options FollowSymLinks
    AllowOverride All
    Order allow,deny
    Allow from all
</Directory>

And in apache/conf/httpd.conf file it should be like as below:

<Directory />
    Options FollowSymLinks
    AllowOverride All
    #Order deny,allow
    #Deny from all
</Directory>

 

Now after making all the changes, Restart your Apache server. Open your browser and type http://localhost/(cake-folder)/ 

install cakephp

You can continue CakePHP development If you are getting a green screen as above. Good luck with CakePHP Framework.


 

About Ketan Patel

A Web Developer having 7+ years of experience in web development. Worked with Laravel-Lumen, CakePHP, CodeIgniter, Opencart to make sites for startup companies and small businesses. Apart from blogging, he likes to read Novels, Listening music and Net surfing.