LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian
User Name
Password
Debian This forum is for the discussion of Debian Linux.

Notices


Reply
  Search this Thread
Old 01-07-2019, 03:57 PM   #1
ehswift71
LQ Newbie
 
Registered: Jan 2019
Posts: 1

Rep: Reputation: Disabled
Angry Why Does the Leading / Get Removed From the URL When the Link is Clicked On in Google?


Hi,

Our company hosts its website on Debian Linux using Apache 2.4. It uses the WordPress CMS platform and a plugin to direct from .php to .html, which seems to be working just fine.

But I've noticed a weird issue that I can't seem to fix. Here's an example.

When you look at the URL in the Firefox browser it does not have a slash at the end of the URL and looks like this: https://www.westgatecomputers.com

If I copy it from the address bar it loads with a trailing slash like this: https://www.westgatecomputers.com/

Here's the problem I have. When I am logged into the Google Search Console and using the robots.txt tester I hover over the link, "See live robots.txt" it shows me the correct link with the / before robots.txt but after clicked the leading / gets removed from the URL.

Before Clicked Link: https://www.westgatecomputers.com/robots.txt
After Clicked Link: https://www.westgatecomputers.comrobots.txt

The later link obviously results in an error, but how do I fix this?

This same issue was happening on the old website links in Google's index as well.

===================================================================

Here are contents of my .htaccess file.

# BEGIN Comet Cache WmVuQ2FjaGU (the WmVuQ2FjaGU marker is required for Comet Cache; do not remove)

# Enable GZIP compression.
<IfModule deflate_module>
<IfModule filter_module>
AddOutputFilterByType DEFLATE text/plain text/html
AddOutputFilterByType DEFLATE text/xml application/xml application/xhtml+xml application/xml-dtd
AddOutputFilterByType DEFLATE application/rdf+xml application/rss+xml application/atom+xml image/svg+xml
AddOutputFilterByType DEFLATE text/css text/javascript application/javascript application/x-javascript
AddOutputFilterByType DEFLATE font/opentype application/font-otf application/x-font-otf
AddOutputFilterByType DEFLATE font/truetype application/font-ttf application/x-font-ttf
</IfModule>
</IfModule>

# END Comet Cache WmVuQ2FjaGU

AddHandler cgi-script .bat .exe .pl .cgi
Options +ExecCGI +FollowSymLinks

# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>

# END WordPress
 
Old 01-09-2019, 06:05 PM   #2
Brains
Member
 
Registered: Apr 2009
Distribution: Debian testing
Posts: 960

Rep: Reputation: 241Reputation: 241Reputation: 241
Clicking on the Before link does bring me to the text. Which shows many instances of:
Quote:
User-Agent: Blah blah
Allow: /
Quote:
When I am logged into the Google Search Console and using the robots.txt tester
Is there a https://www.westgatecomputers.com tester? Perhaps the line in red above needs to be added somewhere.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Firefox Freezes UI When a mailto Link is Clicked rshepard Linux - Software 3 10-16-2015 08:43 PM
how to run a function when a link is clicked venkat@123 Programming 3 09-25-2008 09:16 AM
Switch to firefox when link is clicked krazytekn0 Ubuntu 2 07-29-2007 08:02 AM
kmail freezing when html link is clicked mrapathy Slackware 2 10-31-2006 06:15 PM
Updating MySQL DB when a link is clicked with PHP Erik Thorsson Programming 2 12-03-2004 07:35 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian

All times are GMT -5. The time now is 12:30 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration