Link to home
Start Free TrialLog in
Avatar of steva
steva

asked on

Page reload loads wrong page

I have a site at

                                           https://mysite.com/index.php

where people can login and design a web page. But there's an intermittent problem.  If the page is refreshed by clicking the Chrome "reload" icon, instead of reloading the same page,  the browser somtimes loads

                                               https://mysite.com/mysite.com/login.php.  

There are two prolems with this URL.  First, mysite.com is repeated and second,  index.php is replaced with login.php.  login.php is a valid page.  It's how people log in.   But why is it loaded here?

Another clue:  the browser only puts in the bad URL if I clear the Chrome cache before I reload the page.  But even clearing the cache doesn't always generate the error.

It looks like maybe a mod_rewrite problem, and I do have some rewrites in the config file, but nothing that would do this.

I can't think of a mechanism that would cause the login page to get loaded in this case, especially with an extra mysite.com.

Does this make any sense to anyone?  
Thanks for any ideas.
Avatar of Joe Fulginiti
Joe Fulginiti

My guess is the logic of the page is trying to do some sort of redirect where it incorrectly parses the site url. I would look over the code and see if you can find where the bug is.  Chances are the redirect code has something to do with SSL redirection within the page code. Try and see what happens if you visit the page with https vs http and see if you can find a pattern.
Avatar of steva

ASKER

That was it!   Thank you.
This question needs an answer!
Become an EE member today
7 DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform.
View membership options
or
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.