Welcome Guest, Not a member yet? Register   Sign In
htaccess
#1

[eluser]Optiman[/eluser]
Can someone please tell me how to remove the index.php in url using htaccess file?

Thank You,
JohnC
#2

[eluser]InsiteFX[/eluser]
You can try this one but there is no general one!
Code:
// ./application/config/config.php
$config['index_page'] = '';

// .htaccess
// .so is for running on windows .c is for server
<IfModule !mod_rewrite.c>
#unremark to Generate server 500 error to make sure .htaccess is working!

AddHandler application/x-httpd-php53 .php
php_value default_charset utf-8

Options FollowSymLinks
DirectoryIndex index.php

RewriteEngine On

#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 $1 !^(index\.php|assets|css|js|images|img|robots\.txt|favicon\.ico)
RewriteRule ^(.*)$ index.php/$1 [L,QSA]

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php/$1 [L,QSA]
</IfModule>

<IfModule !mod_rewrite.c>
ErrorDocument 404 index.php
</IfModule>
#3

[eluser]Optiman[/eluser]
Thank You!
#4

[eluser]InsiteFX[/eluser]
Your very welcome, here is a good site for .htaccess

.htaccess tips and tricks - there are two pages
#5

[eluser]Optiman[/eluser]
THX again.




Theme © iAndrew 2016 - Forum software by © MyBB