Welcome Guest, Not a member yet? Register   Sign In
Problem removing index.php from url
#1

[eluser]Ram2810[/eluser]
Hello everyone... this problem is basic isue, i solved it about 6 months back but now i am facing the same problem ... nothing working this time... i need to remove index.php from url as it is becoming a problem while loading images ,css etc........ i followed the method given in user guide but its not working .... i went through lot of docs online nothing worked .... i thought its high time i consulted you guys.... please any one guide in this matter .... thank you
#2

[eluser]bretticus[/eluser]
What have you tried thus far?

What's your file structure?
What do you have in .htaccess?
Can you show us your config.php file?
#3

[eluser]Ram2810[/eluser]
file floder structure

www(public_html)
application
assets
system
index.php
.htaccess

.htacess file
Code:
RewriteEngine on
RewriteCond $1 !^(index\.php|images|css|js|javascript|robots\.txt|favicon\.ico|license.txt)
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ ./index.php/$1 [L,QSA]

config.php details

Code:
$config['base_url']    = "http://localhost/lotus_ci";
$config['index_page'] = "index.php";
$config['uri_protocol']    = "AUTO";
$config['url_suffix'] = "";
$config['language']    = "english";
$config['charset'] = "UTF-8";
$config['enable_hooks'] = FALSE;
$config['subclass_prefix'] = 'MY_';
$config['permitted_uri_chars'] = 'a-z 0-9~%.:_\-';
$config['enable_query_strings'] = FALSE;
$config['controller_trigger']     = 'c';
$config['function_trigger']     = 'm';
$config['directory_trigger']     = 'd'; // experimental not currently in use
$config['log_threshold'] = 0;
$config['log_path'] = '';

.............
........




i hope you can help me out
thankyou
#4

[eluser]daparky[/eluser]
Try something like this in your HTACCESS file:

Code:
AddType x-mapp-php5 .php
Options -MultiViews

RewriteEngine On
RewriteCond $1 !^(index\.php|assets|css|images|js|javascript|robots\.txt|favicon\.ico|license.txt)
RewriteRule ^(.*)$ /index.php/$1 [L]

Or

Code:
RewriteEngine On
RewriteCond $1 !^(index\.php|assets|css|images|js|javascript|robots\.txt|favicon\.ico|license.txt)
RewriteRule ^(.*)$ /index.php/$1 [L]

Remember to put the directories of the things you want to unblock.
#5

[eluser]Ram2810[/eluser]
am getting error 500 while uing the above mentioned method........... not solved yet
#6

[eluser]kurucu[/eluser]
You need to set
Code:
$config['index_page'] = "";
I don't think there was anything wrong with your .htaccess file.
#7

[eluser]Ram2810[/eluser]
even after setting $config['index_page']="" am getting 500 error
#8

[eluser]kurucu[/eluser]
Then use your original .htaccess? When did the 500 error arrive?

Also, are your file/folder permissions set correctly (might need to be 644/755 respectively)?
#9

[eluser]Ram2810[/eluser]
my original .htacces file doesnt contain any code at all.I am testing on my local sytem OS is windows so file permissions is not a problem.

I added following code to my .htaccess file
Code:
AddType x-mapp-php5 .php
Options -MultiViews

RewriteEngine On
RewriteCond $1 !^(index\.php|assets|css|images|js|javascript|robots\.txt|favicon\.ico|license.txt)
RewriteRule ^(.*)$ /index.php/$1 [L]

i did set the index file in config to null i.e ""

after doing all these things i started getting 500 error ...

What is wrong am i doing??
#10

[eluser]wiredesignz[/eluser]
Server 500 errors indicate mod_rewrite is not installed.




Theme © iAndrew 2016 - Forum software by © MyBB