views:

1079

answers:

3

how to remove the index.php from the cakephp url? In order to access my forms folder, I have to give the url : http://localhost/cake_1_2/index.php/forms.

how do i remove that index.php?

I removed the .htaccess from the folders as mentioned in core.php and uncommented the App.baseUrl line. Yet,I'm not able to view the page without the index.php in the url.

+2  A: 

If you're using CakePHP with mod_rewrite on (to get pretty URL's) you can create new folders within WEBROOT and access files just fine.

Example:

Site/webroot/forms/form.php = http://www.sitename.com/forms/form.php

CakePHP's mod_rewrite is setup to check for existing files in WEBROOT and NOT pass them to index.php.

If you need to get up to folder outside of webroot you might consider playing with Symbolic links.

Darren Newton
+1  A: 

Check the CakePHP Install guide section for mod_rewrite. Once enabled in Apache, the pretty URLs will just work. If you're not using Apache, you're stuck with ugly URLs.

spoulson
A: 

you can also check this mod rewrite tutorial here. it has general info which will be useful for url cleaning in many situations. there are also examples included.