Welcome Guest, Not a member yet? Register   Sign In
Remove index.php from Url
#1

[eluser]andreiu81[/eluser]
I read the CodeIgniter URLs from User Guide. I applied the rules from there but cannot make to dissapear the index.php from the url. Also when I type the url without index.php i get a 404 error (file not found).

Can you tell me the steps to do to remove index.php from the url?

Thnak you..
#2

[eluser]Glen Swinfield[/eluser]
Check this out - I wrote it the other day:
removing index.php / .htaccess in CodeIgniter
#3

[eluser]Xandrios[/eluser]
If your .htaccess rules are not applied, make sure that .htaccess is indeed the right filename for apache config snippets. Since it can be set to something else in the main apache config.

Actually, are you sure youre running apache? The .htaccess will only work using Apache or an alternative webserver with .htaccess reader. (Lightspeed, patched Lighttpd for example)
#4

[eluser]andreiu81[/eluser]
Now it works...i use apache (from xampp).
#5

[eluser]esra[/eluser]
I have been using Drupal's .htaccess after having problems with the wiki guidelines. It seems to work fine for me under Windows and Linux.

Code:
Options +FollowSymLinks
Options -Indexes
DirectoryIndex index.php
RewriteEngine on
RewriteCond $1 !^(index\.php|images|robots\.txt)
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php/$1 [L,QSA]
#6

[eluser]maicobreako[/eluser]
[quote author="esra" date="1184893283"]
RewriteEngine on
RewriteCond $1 !^(index\.php|images|robots\.txt)
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php/$1 [L,QSA][/code][/quote]

Using the rewrite code from the user guide worked for me, but only without styles. Changing to the code quoted above fixed it.




Theme © iAndrew 2016 - Forum software by © MyBB