Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 4 of 4
  1. #1
    New Coder
    Join Date
    Jan 2007
    Location
    Chennai, Tamil Nadu, India
    Posts
    71
    Thanks
    5
    Thanked 0 Times in 0 Posts

    only default controller is loading for all request - Critical

    Hi,
    My codeigniter project is in live.
    I have two copies of it. One in the root and another in a subfolder.
    Both are configered to work normal.

    The root copy if the one which was made after testing in a subfolder.
    While running from the a subfolder all worked well.

    But when copied to the root folder the default controller is loading for all requests.
    But were as in subfolders and in other servers it is working well.

    It is like the following
    A true copy in root folder like http://sitename.com
    and another true copy in a subfolder like http://sitename.com/abc

    when requesting like this http://sitename.com/gallery the default controller is loaded instead of gallery controller.

    When i tried like this http://sitename.com/index.php/gallery/ then it worked well...
    but http://sitename.com/gallery/ is showing only the default controller. that is the index page.

    here is my htaccess...


    Code:
    php_flag magic_quotes_gpc off
    php_flag short_open_tag on
    
    RewriteEngine on
    
    
    RewriteCond $1 !^(index\.php|images|css|static|robots\.txt)
    RewriteRule ^(.*)$ index.php/$1 [L]

    The server is
    Linux barracuda.elinuxservers.com 2.6.27.18-21 #1 SMP Tue Aug 25 18:13:37 UTC 2009 i686
    PHP Version 5.2.9
    http://vikku.info/
    - யானைக்கும் அடிசறுக்கும்

  • #2
    God Emperor Fou-Lu's Avatar
    Join Date
    Sep 2002
    Location
    Saskatoon, Saskatchewan
    Posts
    16,979
    Thanks
    4
    Thanked 2,659 Times in 2,628 Posts
    This looks like a problem with your rewrite, and nothing with php; everything appears to go through the index.php.

    You have contacted the CodeIgniter support I assume? They will provide you with much better answers in a shorter timeline than a generic support forum can (unless someone here has seen and solved this exact issue).
    PHP Code:
    header('HTTP/1.1 420 Enhance Your Calm'); 

  • #3
    New Coder
    Join Date
    Jan 2007
    Location
    Chennai, Tamil Nadu, India
    Posts
    71
    Thanks
    5
    Thanked 0 Times in 0 Posts

    solved

    Hi,
    I solved it.

    In the above htaccess i replaced the last line
    RewriteRule ^(.*)$ index.php/$1 [L]

    with this
    RewriteRule ^(.*)$ index.php?$1 [L]

    The modification is i changed the index.php/ to index.php?

    and the pages loaded as expected.

    Will there be any side effects cause of the above modification?
    http://vikku.info/
    - யானைக்கும் அடிசறுக்கும்

  • #4
    God Emperor Fou-Lu's Avatar
    Join Date
    Sep 2002
    Location
    Saskatoon, Saskatchewan
    Posts
    16,979
    Thanks
    4
    Thanked 2,659 Times in 2,628 Posts
    I have no idea; I don't use the codeigniter framework so I couldn't even guess what they do and do not expect within their query strings. For that you would have to contact their support.
    PHP Code:
    header('HTTP/1.1 420 Enhance Your Calm'); 


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •