Welcome Guest, Not a member yet? Register   Sign In
codeigniter 3.1.9 with apache and php 7.2 - routing/redirect issues with sym link
#11

(This post was last modified: 07-06-2018, 12:07 AM by BBT.)

(07-05-2018, 11:24 PM)jreklund Wrote: Hi again, those aren't sub-domains. These are:
test1.example.com
test2.example.com
example.com
example.net

So in your case you really should only have:
$config['base_url'] = 'https://example.com';

Try changing the order of the route.php
PHP Code:
$route['test1/select-product'] = "home/select-product";
$route['test2/select-product'] = "home/select-product";
$route['select-product'] = "home/select-product"

If you view the source of the <form> you are submitting, what actual URL have you got?
<form src="https://example.com/test1">...

How do you redirect the user to /test1/select-product?

Activate the debug mode.
/application/config/config.php
$config['log_threshold'] = 4;

You should now get logs inside /application/logs/


================================================================

Hi jreklunk,
Thank you again for your quick reply. When I change the "$config['base_url'] = 'https://example.com';" the home page loads but when I click on "continue" to go to the next page get the below error:


An Error Was Encountered

The action you have requested is not allowed.


And the URL addresses changes to https://192.168.1.2/test1/ instead of https://example.com/test1/select-product.

Below error is logged inside application/logs folder after changing log level to "4" in config.php

INFO - 2018-07-06 17:04:53 --> Config Class Initialized

INFO - 2018-07-06 17:04:53 --> Hooks Class Initialized
DEBUG - 2018-07-06 17:04:53 --> UTF-8 Support Enabled
INFO - 2018-07-06 17:04:53 --> Utf8 Class Initialized
INFO - 2018-07-06 17:04:53 --> URI Class Initialized
DEBUG - 2018-07-06 17:04:53 --> No URI present. Default controller set.
INFO - 2018-07-06 17:04:53 --> Router Class Initialized
INFO - 2018-07-06 17:04:53 --> Output Class Initialized
INFO - 2018-07-06 17:04:53 --> Security Class Initialized
DEBUG - 2018-07-06 17:04:53 --> Global POST, GET and COOKIE data sanitized
INFO - 2018-07-06 17:04:53 --> CSRF cookie sent


When I leave "base_url" value empty and browse to https://192.168.1.2/test1
/ everything works as expected.

Not sure why the response on the public URL is changing to private IP?

Hoping to hear from you soon, as you and other community members are the only hope to fix this problem.


Thank you,
Reply


Messages In This Thread
RE: codeigniter 3.1.9 with apache and php 7.2 - routing/redirect issues with sym link - by BBT - 07-05-2018, 11:47 PM



Theme © iAndrew 2016 - Forum software by © MyBB