Welcome Guest, Not a member yet? Register   Sign In
Root URL dies 404 if query string (?) is present
#1

[eluser]the_nix[/eluser]
My sub pages work fine:

Code:
http://www.example.com/controller/method?var=the_GET_vars_are_ignored_as_expected

However the home page dies 404 if a query string is present

Code:
http://www.example.com/?var=this_causes_404_error

I do not need the information that is contained in those query tags so any solutions that just strips them off is fine. I can't just change the inbound links because they are legacy URLs from external sites.

Copy of my .htaccess file:
Code:
<IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /

    #Removes access to the system folder by users.
    #Additionally this will allow you to create a System.php controller,
    #previously this would not have been possible.
    #'system' can be replaced if you have renamed your system folder.
    RewriteCond %{REQUEST_URI} ^system.*
    RewriteRule ^(.*)$ /index.php?/$1 [L]

    #Checks to see if the user is attempting to access a valid file,
    #such as an image or css document, if this isn't true it sends the
    #request to index.php
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule ^(.*)$ /index.php?/$1 [L]
</IfModule>

<IfModule !mod_rewrite.c>
    # If we don't have mod_rewrite installed, all 404's
    # can be sent to index.php, and everything works as normal.
    # Submitted by: ElliotHaughin

    ErrorDocument 404 /index.php
</IfModule>

Thanks!


Messages In This Thread
Root URL dies 404 if query string (?) is present - by El Forum - 06-04-2009, 04:53 PM
Root URL dies 404 if query string (?) is present - by El Forum - 06-04-2009, 06:39 PM
Root URL dies 404 if query string (?) is present - by El Forum - 06-04-2009, 07:12 PM
Root URL dies 404 if query string (?) is present - by El Forum - 06-04-2009, 08:23 PM
Root URL dies 404 if query string (?) is present - by El Forum - 06-05-2009, 08:11 AM
Root URL dies 404 if query string (?) is present - by El Forum - 06-06-2009, 07:18 AM
Root URL dies 404 if query string (?) is present - by El Forum - 06-06-2009, 07:21 AM
Root URL dies 404 if query string (?) is present - by El Forum - 07-30-2009, 08:28 AM
Root URL dies 404 if query string (?) is present - by El Forum - 07-30-2009, 08:36 AM
Root URL dies 404 if query string (?) is present - by El Forum - 08-20-2009, 04:35 AM



Theme © iAndrew 2016 - Forum software by © MyBB