404 on live host

edited May 2011 in Installation
first of all, thx for great job you done so far!
I have a small issue that I will try to explain:
1) I created a test site with basic custom modules
2) views for displaying custom modules I put in separate folder of /views (e.g. /views/test/
3) when i try to past some var from one page (module view) to another I'm using links like /views/test/page2/some_value and it work ok on my home comp (Xampp installation). When I move it to live hosting I get 404 when try to pass varibles on this way (even if I use /views/test/page2.php/some_value/.
As far I check, values in configuration files are same and both servers support url rewriting.
I assume that I missed something.... do you have any idea?


  • edited 7:30AM
    Try using /index.php/test/some_value and see if that works. If it does, and you are sure that .htaccess is enabled with URL rewriting, make sure the RewriteBase path is set correctly on the server based on the web root folder (if any) that your fuel installation exists in.
  • edited 7:30AM
    HI, thx for answer. I checked with www.mysite.com/index.php/test/page2/9/ and I again get 404 (9 is some value for example).
    It is interesting that, when I use www.mysite.com/index.php/test/page1 or www.mysite.com/index.php/test/page2 (without .php extension) everything works ok, but, when I try to add aditional param (9 in example) to pass from page1 to page2 then I get 404. On local machine it works normally in both cases.
  • edited 7:30AM
    Sorry, I wanted to say that it even work without index.php part but only without url param: www.mysite.com/test/page2/9
    (test is subfolder of views, page2 is name of file and 9 is some param to send through url)
  • edited 7:30AM
    Now I tried to set index_page param in config.php to 'index.php' on both servers. On hosting I still have 404 in all combinations of index_page param and using index.php in url. On other hand, I see the page and even can reach that param by using $CI->uri->segment(3) in page on localhost (also in all combinations of index_page and index.php in uri).
    Only difference between two host are that on localhost my htaccess file starts with RewriteBase /mysite (subfolder of xampp htdocs) while on hosting is set to /.
  • edited 7:30AM
    Are you able to get a normal CI installation running with .htaccess and browsing to a controller (e.g. /test)?

    Although I don't think this is your issue since you have it working locally, what happens if you create a "views/_variables/test.php" file and put in it:
    $vars['find_view'] = TRUE;

    Or if you add to that file:
    $pages['test/page2$|test/page2/:any'] = array('view' => 'test/page2');

    By default, FUEL will look for a view file of test/page2/9.php unless you explicitly tell it the view file (second example), or if you tell it to find the view file (first example above). Otherwise, it will give you a 404 error.
Sign In or Register to comment.