Welcome Guest, Not a member yet? Register   Sign In
URI Troubles
#11

[eluser]Aken[/eluser]
Your htaccess is not the problem. It's the way the route is configured to the function. Something is goofy.

I used a fresh CI to try and recreate your problem. I can't tell you why you're getting the Disallowed Character error, but I can hopefully explain the rest.

Your rules for making sure that the site functions (followurl, settings, etc) act like normal instead of being called as one of your short URLs are only good for that base URL. Meaning "urls" will work but "urls/register" will not. You need to add additional rules if you want your child functions to also work.

I'd recommend something like this:

Code:
// You should always keep these up top before any other custom rules, just in case.
$route['default_controller'] = "followurl";
$route['scaffolding_trigger'] = "";

$route['(followurl|settings|urls|user|)/(:any)'] = "$1/$2";
$route['(followurl|settings|urls|user)'] = "$1"; // Note, this didn't work for me without quotations.

$route['(:any)'] = "urls/getpage/$1";

Hope that helps at least somewhat.
#12

[eluser]stuffradio[/eluser]
It did work in a way, only when I use index.php without the htaccess file though. I'm still trying to find reasons why it won't work properly on the websites server.
#13

[eluser]Unknown[/eluser]
Hi I am new trbajando with Codelgniter and programs as well with php. Trtanado I do a small project but I do not know how I can send information to form a controller in this framework.
I would be very helpful if someone could tell me
#14

[eluser]Aken[/eluser]
If you add your files to the webserver, and you can access your pages like www.example.com/urls and www.example.com/followurl/1234, then the issue is not .htaccess, because it's forwarding them properly through the index.php page. If you receive CI 404 errors, then you may have an issue with htaccess adding something after index.php/ but before your URL, or your routes/controllers are incorrectly set up.

It'd be easier to debug with a live example. I've never worked with a localhost, so I don't know how much it would differ, if at all.
#15

[eluser]stuffradio[/eluser]
It's not on a localhost anymore, I've been developing it on the live machine.




Theme © iAndrew 2016 - Forum software by © MyBB