EllisLab text mark
Advanced Search
     
Mod rewrite missing in 2.1.2?
Posted: 08 October 2012 11:55 AM   [ Ignore ]
Joined: 2012-10-08
15 posts

I was reading some instructions on how to get rid of the index.php and they said to find the mod rewrite on the wiki at https://github.com/EllisLab/CodeIgniter/wiki/_pages

The page seems to be missing?  Has 2.1.2 changed this functionality?  Where are the latest instructions to getting rid of the index.php in the URL please?

Thanks in advance!
Alan

 
Posted: 08 October 2012 12:38 PM   [ Ignore ]   [ # 1 ]   [ Rating: 0 ]
Joined: 2011-02-23
882 posts

mod_rewrite is a module from your apache therefore it isn’t directly related to CI. To remove index.php you need to configure the .htaccess file in your root location of your app and set

$config['index_page'''

Search the forums or Google/Stackoverflow to find a proper .htaccess (as long as you got an apache2-server running)

 Signature 

ignited Community Framework (WiP)  |  Read the User’s Guide. It won’t bite.

STOP! Before posting your questions, remember the WWW Golden rule:
What did you try? What did you get? What did you expect to get?

CI example .htaccess

 
Posted: 08 October 2012 01:12 PM   [ Ignore ]   [ # 2 ]   [ Rating: 0 ]
Joined: 2012-10-08
15 posts

Thanks for the prompt clarification.  I misunderstood from the video tutorials that it was something specific to CI. 

I searched again and found this: http://ellislab.com/codeigniter/user-guide/general/urls.html and it looks like this is working now:

RewriteEngine On
RewriteBase /myappdirectory/
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*) index.php?/$1