How to remove extra numbers and letters from the end of web address bar

2.7k Views Asked by At

I have lots of extra letter and numbers at the end of all the site pages. If you check the website: www.rsiapparel.co.uk you will see what I mean, I get this: http://www.rsiapparel.co.uk/#sthash.4xYBB5vG.dpbs

How do I remove these bits #sthash.4xYBB5vG.dpbs?

3

There are 3 best solutions below

1
On

If you hava an access to the .htaccess file you can define some rules there.

for exampele:

RewriteRule    ^Article/([0-9]+)/([0-9a-zA-Z]+)/?$    /Articles/myArt.php?aid=$1&title=$2    [NC,L]    # Rewrite Articles

The [NC] flag: causes the RewriteRule to be matched in a case-insensitive manner

The [L] flag: "The [L] flag causes mod_rewrite to stop processing the rule set. In most contexts, this means that if the rule matches, no further rules will be processed."

The # is a comment

$x: that is how you match the values in the adrress to the variables

You may find this helpful: url-rewriting-for-beginners

0
On

What you require is what is known as clean URLs. This can be achieved by making use of a php module known as mod_rewrite. I am no expert myself but that is the direction you need to search. As already hinted this can be achieved by setting up regular expression rules in a .htaccess file, that rewrite the urls to something more user friendly.

0
On

I can see that you are using ShareThis Hoverbar on your website. A simple way to turn off hash from address bar would be change the following code on your website - Change - stLight.options({publisher: "d083c212-e330-416e-b1c6-ed1bc3fe5bd5", doNotHash: false, doNotCopy: false, hashAddressBar: true});

to - stLight.options({publisher: "d083c212-e330-416e-b1c6-ed1bc3fe5bd5", doNotHash: false, doNotCopy: false, hashAddressBar: false});

If you want to turn off CopyNShare for the copied content as well, you can switch doNotCopy: true as well.

Hope this will resolve your issue.