09-10-2010, 04:08 PM
[eluser]Unknown[/eluser]
Hello,
I'm just starting out with CodeIgniter and I've been stuck on this issue for quite a while.
I'm trying to remove the index.php from the url via a .htaccess file.
I've tried several variations that I have found, but none seem to actually
remove that index.php portion of the url.
The following code allows me to navigate my site fine, but it handles
exactly as if I didn't have a .htaccess file at all.
My URL's appear like:
http://www.MyServer.com/ChucksCITest/ind...ass/method
I would like to have them appear as:
http://www.MyServer.com/ChucksCITest/class/method
Any thoughts?
* EDIT Nevermind - I changed the line:
RewriteRule ^(.*)$ index.php/$1 [L]
to:
RewriteRule ^(.*)$ index.php?$1 [L]
And changed the config file to remove the "index.php" as the defualt
for:
$config['index_page'] = "index.php";
Hello,
I'm just starting out with CodeIgniter and I've been stuck on this issue for quite a while.
I'm trying to remove the index.php from the url via a .htaccess file.
I've tried several variations that I have found, but none seem to actually
remove that index.php portion of the url.
The following code allows me to navigate my site fine, but it handles
exactly as if I didn't have a .htaccess file at all.
My URL's appear like:
http://www.MyServer.com/ChucksCITest/ind...ass/method
I would like to have them appear as:
http://www.MyServer.com/ChucksCITest/class/method
Code:
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /ChucksCITest/
#Checks to see if the user is attempting to access a valid file,
#such as an image or css document, if this isn’t true it sends the
#request to index.php
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php/$1 [L]
</IfModule>
Any thoughts?
* EDIT Nevermind - I changed the line:
RewriteRule ^(.*)$ index.php/$1 [L]
to:
RewriteRule ^(.*)$ index.php?$1 [L]
And changed the config file to remove the "index.php" as the defualt
for:
$config['index_page'] = "index.php";