Welcome to WebmasterWorld Guest from 54.225.16.58

Forum Moderators: Ocean10000 & incrediBILL & phranque

Strange behavior with my urls

something is wrong in Apache .conf file, I think!

     
8:27 pm on May 12, 2017 (gmt 0)

Senior Member

WebmasterWorld Senior Member Top Contributors Of The Month

joined:Apr 1, 2016
posts: 1027
votes: 267


Whenever I click on an external link, say from google to my website and the url has a /.
example.com/bluewidgets
example.com/blue/widgets

the slashes disappear and url becomes
example.combluewidgets

But if I go to the home page and click through to these pages with the links everything works fine.

I mentioned yesterday in an unrelated thread that I made changes with regards to slashes in the URLs, This has nothing to do with that as that change was never deployed to the server.

The last changes I made was with implementing the SSL certificates, I must have inadvertently made a typo in the .conf file. Anybody have any idea of what could be wrong?
9:07 pm on May 12, 2017 (gmt 0)

Moderator from US 

WebmasterWorld Administrator keyplyr is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month

joined:Sept 26, 2001
posts:9219
votes: 439


Check your end anchors
9:34 pm on May 12, 2017 (gmt 0)

Senior Member

WebmasterWorld Senior Member Top Contributors Of The Month

joined:Apr 1, 2016
posts: 1027
votes: 267


This is what I have for the port 80 that is supposed to redirect to port 443, which it does. But what I think is happening is that it redirects all request from http://www.example.com/whatever/what/else to https://www.example.com but leaving keeping everything after the first slash like this https://www.example.comwhatever/what/else

<VirtualHost *:80>
Server Name example.com
Server Alias www.example.com
Redirect Permanent / https://www.example.com
</VirtualHost>


So how do I fix the redirect to keep the first slash?
9:36 pm on May 12, 2017 (gmt 0)

Moderator from US 

WebmasterWorld Administrator keyplyr is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month

joined:Sept 26, 2001
posts:9219
votes: 439


(Just a guess) Have you tested with this?
<VirtualHost *:80>
Server Name example.com
Server Alias www.example.com
Redirect Permanent / https://www.example.com/
</VirtualHost>
Of course Google may take a few days to update the links
9:38 pm on May 12, 2017 (gmt 0)

Senior Member

WebmasterWorld Senior Member Top Contributors Of The Month

joined:Apr 1, 2016
posts: 1027
votes: 267


So as I was typing the post I think I found the answer, I added a trailing slash:
Redirect Permanent / https://www.example.com/

I tried it, and seems to work.
@keyplyr I guess that what you meant by end anchor?
Can someone please confirm that this correct and sufficient?
Thanks!
9:42 pm on May 12, 2017 (gmt 0)

Senior Member

WebmasterWorld Senior Member Top Contributors Of The Month

joined:Apr 1, 2016
posts: 1027
votes: 267


@keyplyr
Of course Google may take a few days to update the links

Regretfully you are correct, links from Google are missing the slash.
I'll fetch and submit, to see if can expedite things.

Thank you!
9:52 pm on May 12, 2017 (gmt 0)

Moderator from US 

WebmasterWorld Administrator keyplyr is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month

joined:Sept 26, 2001
posts:9219
votes: 439


Hopefully that did it :)
10:24 pm on May 12, 2017 (gmt 0)

Senior Member

WebmasterWorld Senior Member Top Contributors Of The Month

joined:Apr 1, 2016
posts: 1027
votes: 267


It seems to have worked.