Welcome Guest, Not a member yet? Register   Sign In
Redirect Issues with GET parameters - 404 Error
#1

[eluser]Unknown[/eluser]
I followed the examples online remove index.php from the URL. (see below for the .httaccess)

I also setup a default action controller. Everything mostly works okay.

http://www.mysite.com goes to the right controller and does the right thing.

However, http://www.mysite.com/?ref=p&t2=455 causes a 404 error. I tried every type of uri_protocal and that didn't work, Auto seems to work the best.

Also http://www.mysite.com/mycontroller/mymet...f=p&t2=455 works fine. Its only on the default case that doesn't work. I am assuming it is using the GET parameters to figure out the routing.

thanks in advance



.htaccess looks like:


Code:
RewriteEngine On
    RewriteBase /~trifecta/prod/
    
    #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
    #This last condition enables access to the images and css folders, and the robots.txt file
    #Submitted by Michael Radlmaier (mradlmaier)
    RewriteCond $1 !^(index\.php|images|robots\.txt|css)
    RewriteRule ^(.*)$ index.php?/$1 [L]
#2

[eluser]WanWizard[/eluser]
CI standard doesn't support both URI segments and query string variables. As soon as you enable 'query_strings' in the config, it tries to use the query string for routing.

Do a search here on 'allow_get_array', you'll find one of my posts describing how to extend CI to support $_GET while still use URI segments for routing.




Theme © iAndrew 2016 - Forum software by © MyBB