redirect error with maintenance mode my controller |
I am working on my redirection for my maintenance mode but have run in to a snag.
Each controller extends MY_Controller. On MY_Controller.php I have a function called maintenance_mode() which if is TRUE will redirect to the maintenance controller OK. What I am hoping is if maintenance mode is TRUE but then if I am logged to admin will let me view website once redirected home controller. It redirects to home url but then throws firefox error Code: The page isn't redirecting properly Any suggestion on solution. PHP Code: <?php
There's only one rule - please don't tell anyone to go and read the manual. Sometimes the manual just SUCKS!
not echo before header function ( redirect ).
$this->session->setflashdata('key', 'blah blah blah blah'); redirect(base_url()); In view for base_url(): echo $this->session->flashdata('key');
(02-04-2016, 11:18 PM)nhatkontum Wrote: not echo before header function ( redirect ). It has nothing to do with session or flashdata
There's only one rule - please don't tell anyone to go and read the manual. Sometimes the manual just SUCKS!
Did you try doing a redirect using ( location / refresh ) ?
What did you Try? What did you Get? What did you Expect?
Joined CodeIgniter Community 2009. ( Skype: insitfx )
A "The page isn't redirecting properly" error is shown when the browser detects you are in a redirect loop.
(02-05-2016, 05:46 AM)InsiteFX Wrote: Did you try doing a redirect using ( location / refresh ) ? I think I have now got it working Have I set MY_Controller up correct any changes you would recommend. PHP Code: <?php Maintenance Controller PHP Code: <?php
There's only one rule - please don't tell anyone to go and read the manual. Sometimes the manual just SUCKS!
|
Welcome Guest, Not a member yet? Register Sign In |