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

[eluser]SaJu[/eluser]
Hi,

I have done a site using codeigniter framework, the site is working fine from offline(wamp server). When I checked it from online server, it is not working correctly.
I believe I have done all the things like .htaccess file creation, making $config['index_page'] ="", etc.
I have checked my server configuration for allow_url_fopen status, by default it was pointed "off". But I have uploaded a php.ini file to the server(inside public_html folder) with content 'allow_url_fopen = On' to change the status. Now the status of 'allow_url_fopen' is showing "on", but still the url is needed index.php to get the things, else it will always pointed to home page (default controller). can anybody will help me to solve this issue..

you can see the site from url http://www.tenantsearcher.com/
No links are working correctly without index.php in the url.

Thanks in advance ,
Saju
#2

[eluser]Evil Wizard[/eluser]
what is in the htaccess file? and has the server set the allow overwrite directory option?
#3

[eluser]SaJu[/eluser]
.htaccess (hypertext access) is the default name of a directory-level configuration file. The .htaccess file is placed inside the web tree, and is able to override a subset of the server's global configuration
#4

[eluser]Evil Wizard[/eluser]
yes, I know that, what is the content of the htaccess file? do the rewrite rules work on your local development server? ask your live hosting provider to tell you if they allow the use of custom htaccess files, the filename itself may have been explicitly changed in the httpd.conf
#5

[eluser]SaJu[/eluser]
Sorry, it was my mistake i didn't read your question correctly....
The .htaccess file content is given below

RewriteEngine on
RewriteCond $1 !^(index\.php|resources|robots\.txt)
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php/$1 [L,QSA]


One more thing, Now the site is copied to a folder inside the root directory(public_html) and it is working fine from there. The link is given below

http://tenantsearcher.com/asdf
#6

[eluser]SaJu[/eluser]
I have got the solution. Now my site is working fine....
I have changed the $config['uri_protocol'] from 'AUTO' to 'QUERY_STRING'. Now it is working.

If anybody getting this sort of problem, please try with editing $config['uri_protocol'] value from system/application/config.php. Please try by assigning different flavors. I tried with both 'AUTO' and 'PATH_INFO' but failed. Finally value 'QUERY_STRING' solved my issue.

Anyway thanks for the reply and help, specially to Evil Wizard....




Theme © iAndrew 2016 - Forum software by © MyBB