Can't view webpages built with CodeIgniter when it's uploaded |
[eluser]Yanny[/eluser]
Hi all, When using localhost everything is ok, but when I upload it online then I can't access the pages, it redirects me to a 404 error page. For example this page: http://ycscripts.co.cc/scripts/ticket-ma...r/register The folder ticket-management-system is built with framework CodeIgniter. The main site http://ycscripts.co.cc/ is not built with a framework, just plain php code. I think it has something to do with htaccess. I have a htaccess file in main root ycscripts.co.cc and there is another htaccess file in ycscripts.co.cc/scripts/ticket-management-system/. I have tried to stop mod rewriting the directory ticket-management-system using this code in .htaccsess file on main root: RewriteRule ^scripts/ticket-management-system - [L] It does not work this way. Has anyone an idea how I can solve this? Thanks in advance!
[eluser]Georgi Budinov[/eluser]
The htaccess in the root folder is not your problem. Revert it as it was. Access the following url - http://ycscripts.co.cc/scripts/ticket-ma...r/register. Follow the guide to remove index.php by putting htaccess in the folder http://ycscripts.co.cc/scripts/ticket-ma...nt-system/. And take a note on the using 'U' and 'u' in the url. Edit: also remove notices in the index.php by adding the following line: Code: error_reporting(E_ERROR | E_WARNING | E_PARSE);
[eluser]Yanny[/eluser]
I have already done removing index.php by putting htaccess in the folder http://ycscripts.co.cc/scripts/ticket-management-system. application/config/config.php $config['index_page'] = ""; http://ycscripts.co.cc/scripts/ticket-ma...m/htaccess RewriteEngine on RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^(.*)$ index.php/$1 [L] With the lines above in htaccesss it should automatically work, right? It doesn't, so what do I have to add in the htaccess file?
[eluser]Georgi Budinov[/eluser]
Could be because of shared hosting issues. Try updating this line: Code: RewriteRule ^(.*)$ index.php/$1 [L] to Code: RewriteRule ^(.*)$ index.php?/$1 [L] If still not working look at the threads in the forum about it
[eluser]Yanny[/eluser]
It still does not work: http://ycscripts.co.cc/scripts/ticket-ma...r/register But now it does not redirect to a 404 error page.
[eluser]Georgi Budinov[/eluser]
Try http://ycscripts.co.cc/scripts/ticket-ma...r/register ... 'u' not U
[eluser]Yanny[/eluser]
Yay it works! The reason I use a captital is because I have learned that from the CodeIgniter user guide... Thanks for helping me out with it! |
Welcome Guest, Not a member yet? Register Sign In |