Admin Adds Extra "forward Slash" In Address Bar

For some reason the admin in 4.1.2 seems to be adding an extra forward slash in the address bar. When I initially log in it is normal, but as I move around it changes it to have 2 of the // instead of just one. So it would do something like this…



blahblahblah. com//admin.php




I added the extra space but I don't understand why the extra forward slash gets put in. Again, I don't go to this from the start, but it changes to it at some point. Most of the time it works fine still but if you go to “Design>>Themes” and then click on the “Visual Editor” button you will get a 404 error. If you take out the extra slash then the visual editor works fine.



So I am not for sure if I put an extra forward slash some place that I do not need or if the program is adding it by itself. I am guessing since it does not do the same thing on the demo of CSC that I must have something wrong. The problem with thinking that is they tend to put their newest version on the demo that has most things fixed.

I don't have this issue at all in V4.1.2, check your config.local.php for the http_host value - I use “http://mydomain.com” without a trailing slash with no problems in V2/V3/V4.



Have not yet looked into it in any great depth so I'm not sure of the relevance of the “storefront URL” in V4, but also check in Administration>Stores>Storefront URL. My V4 stores also do not have a trailing slash here either.

I found it. It was actually in the following part of the code…


$config['https_path'] = '/';


…because we left the / in between the quotes it was messing up some. I had the forward slash there when I installed it in a folder. I removed the name of the folder but not the forward slash. Live and learn!



Thanks StellarBytes!

Also should not specify the protocol (http/https). Leave it for the cart's configuration to figure out. I.e.

$config['http_host'] = 'www.yurdomain.com';

The cart may strip it out and deal with it, but there's no need to specify it.

Thanks Tony. Yeah, I actually got that one right.