Welcome Guest, Not a member yet? Register   Sign In
Issue with Routing: My fault or Bug?
#1

My base URL is:

PHP Code:
public $baseURL 'http://example.com/public/'

echo base_url() prints <?=base_url('manage/update-content/home/')?>

return redirect()->to('/manage'); redirects me to http://example.com/manage/. It excludes the /public segment.

<?=base_url('manage/update-content/')?> prints http://example.com/public/manage/update-content/ but behave like http://example.com/manage/update-content/

The issue is only with the '/public' segment. This segment excludes every time.

Am I doing anything wrong?
"Who thinks in code"
Perfectly describes who I am
mbparvez.me
Reply
#2

Your baseURL should not include "public" - that should be handled in your web server setup.
Your document root should be set to PROJECT_FOLDER/public.
Your baseURL would then be 'http://example.com'
And redirecting to '/manage' should go to the right place.

The way you have it configured, the browser thinks you are in '/public/manage/...', and redirecting to '/manage' is behaving as it should given this.
Reply




Theme © iAndrew 2016 - Forum software by © MyBB