Welcome Guest, Not a member yet? Register   Sign In
how to remove index.php?
#1

[eluser]Hamed[/eluser]
it is possible to remove index.php? like:
http://domain.tld/index.php/main change to
http://domain.tld/main

??
#2

[eluser]InsiteFX[/eluser]
.application/config/config.php
Code:
$config['index_page'] = '';

.htaccess - may or may not work depending on your environment!
Code:
php_value default_charset utf-8

Options FollowSymLinks
DirectoryIndex index.php

RewriteEngine On
RewriteBase /

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

[eluser]Matalina[/eluser]
Check: http://ellislab.com/forums/viewthread/112024/ for in depth info.
#4

[eluser]Mohammed Zayan[/eluser]
Check This http://ellislab.com/forums/viewthread/214907/
#5

[eluser]Hamed[/eluser]
I am using Apache on windows
After I use your instruction I get

Not Found
The requested URL /fa was not found on this server.

Can anyone help me ?
#6

[eluser]Hamed[/eluser]
Anyone can help me?
#7

[eluser]bauc[/eluser]
Is your site hosted in a subdirectory? You either need to edit the .htaccess line

From:
RewriteRule ^(.*)$ index.php/$1 [L,QSA]

To
RewriteRule ^(.*)$ /{thedirectorywhereindex.phpis/}index.php/$1 [L,QSA]

Just change the directory {} part. The other solution is to edit your hosts file and edit the Apache virtual host file.
#8

[eluser]Hamed[/eluser]
I am using Apache on windows.
I will test your solution.
#9

[eluser]InsiteFX[/eluser]
All you need to do for Windows 7 is this

1) open c:\Windows\System32\drivers\hosts with notepad
2) add 127.0.0.1 localhost

That's it.

3) Oh, make sure you save it.

On Windows when you first open the site it will show index.php all other calls it will be missing but does not show up on a live site.
#10

[eluser]Hamed[/eluser]
Then, There is no problem with Windows server 2003? I have windows server 2003 with ZPanel.
I cann't find hosts.




Theme © iAndrew 2016 - Forum software by © MyBB