Copy link to clipboard
Copied
I've been running my site successfully for years, coded with Dreamweaver CS3.
In the last few weeks my Adsense ads (size 160 x 600) have sometimes been replaced with a panel (of the same size) from my server saying that 'the page (advert) cannot be found' (apparently error 404).
My 'Server's Help' say I should add http:// in front of all page URL's. First I'm wondering how I managed for all these years without it, but mainly how do I add the http:// on over 150 pages, and hopefully without having to edit each page individually.
1 Correct answer
In CC 2017 or later, hit Ctrl/Cmnd + Shift + F to open the Find & Replace tool.
Click the Basic Tab
In the first large field (unlabeled Find field), add the entire code of the link (<a href="//path-to/link.html">)
For the "In" dropdown menu, choose Entire Current Local Site
Leave the next field as [any tag]
In the second large field (unlabeled Replace With field) add the entire code of the new link (<a href="http: //www.path-to/link.html">)
Hit Replace All
Copy link to clipboard
Copied
In CC 2017 or later, hit Ctrl/Cmnd + Shift + F to open the Find & Replace tool.
Click the Basic Tab
In the first large field (unlabeled Find field), add the entire code of the link (<a href="//path-to/link.html">)
For the "In" dropdown menu, choose Entire Current Local Site
Leave the next field as [any tag]
In the second large field (unlabeled Replace With field) add the entire code of the new link (<a href="http: //www.path-to/link.html">)
Hit Replace All
Copy link to clipboard
Copied
you can also use a reg exp in the search and replace files ({ctrl|cmd} shift f
think to check the use of regular expression and search for
href="(?!http*://)
that you will replace with
href="http://
if you not used to regex... the search will focus on all string starting by href=" and not icnlude http with a facultative s and followed by ://
that way you will only replace the url link that doesn't use any protocol
be aware of depending on your web site, the reg ex can be adjusted
Copy link to clipboard
Copied
But back up your site folder first incase anything hideously goes wrong.

