How to rebuild an entirely static website, without changing URLs? - html

I have a website that I was asked to "redesign".
The site itself was built and still maintained by FrontPage, so there are hundreds (hopefully not more) of HTML pages.
My main limitation is that I can't change any of the URLs because they have been there for over 10 years and have a lot of SEO value.
I want to rebuild the site in a smart way (CSS classes, dynamic pages, etc.) but also give the owner the ability to change content as he needs.
I was thinking of using WordPress, however I don't have experience with it and I'm not sure what it's limitations are.
My other issue, is that I need server side languages in order to enable this kind of site, but I don't know how to do that without changing the URLs.
And after I deal with all that, is there any way around manually handling every single page?
Any suggestions, or pushing in a certain direction are all welcome.

Feel free to provide new, meaningful, URLs but make 100% sure that you configure correct 301 redirects from all old URLs to the new ones.

You may change the permalinks from your WordPress admin section once you've written the .htaccess file. The old links of the static pages can then be redirect to new pages and links using 301 redirects which won't negatively affect the existing PageRank and SEO; see How to redirect a webpage

Related

How to embed another website into my own web to keep the same header

We have a web app that we want to integrate in the websites of several clients by a subdomain, since in most cases we cannot modify their webs. Besides, our web is build in a different language and we want to keep it in our servers.
At the moment, they are adding links on their site's menu to our subdomain, however, they want to keep the same header and the footer so that the user feels that they are on the same website.
For now, we are copying the html and inserting it in our template, but this is not a good solution for the future and we are having several problems due to javascript conflicts.
How can we solve this? An iframe does not allow us to modify its content, I think. Thanks in advance.
Don't know any good ways to do this client side.
First thought is to have all the pages link your Javascript to create the header/footer, but it's not good to require Javascript to display content.
HTML imports would really be perfect for this, but it not well supported. You can consider if you're willing to use a polyfill, like Google's webcomponents.
I feel like best approach here would be to do this somehow not on client side. Either use a server that lets you use a template engine, or some static site generator that supports templating.

Display JPG based upon URL

I have a JPG in the header section of a responsive HTML page. I want to use the same site content for multiple domains that will point to my single set of files at my hosted URL. Example : mysite.com will host all files. But a second site - example theirsite.com will point in a forward to my hosted files location.
All the content will be the same, EXCEPT FOR the one image file (logo.png) or can be any name, but I would like to see if I can image-substitute 1 file (logo.png) to render so that, when visitors come to mysite.com, they see my file. When visitors come to theirsite.com they will see the logo file for theirsite.com instead of for mysite.com Sorry if I have not explained this professionally.
There are two real ways to do this. The best way is to handle it server-side.
You would need some sort of dynamic site generation, such as PHP. As the site isn't changing on each request, I'd recommend doing this generation ahead of time. Then you can utilize static hosting on CDNs and such. The specifics of how you do this depend on your technology choice. And, it matters little what you pick.
Doing the switch server-side is better, as crawlers will be able to see the right version of the site. Most crawlers don't run client-side code.
The second option is to handle it client-side. In this case, I'd recommend including a site definition file for each domain and writing some JavaScript to check the hostname the site was loaded on, and load the right site definition file. That file could contain elements and attributes to replace. Again, this is less desirable of an option, but still possible.

Font icon not displaying on subdomains but works on parent domain

What I have:
I have a website consisting of a domain and two subdomains. My website is a WordPress multisite installation. The domain and subdomain websites each use the same WordPress theme that make extensive use of font icons.
What I need:
I need my font icons to display on the subdomain websites instead of diplaying as...
Font icons display fine on the main domain.
The problem:
My console log reveals:
Cross-Origin Request Blocked: The Same Origin Policy disallows reading
the remote resource at http://xxx. (Reason: CORS header
'Access-Control-Allow-Origin' missing).
My question:
Why would a website, theme and/or font icon behave differently on a subdomain than the main domain and how can resolve the matter?
This answer has started in the comments of the question. Sorry about that, but I won't repeat what I said there.
Ok, so I decided to put it as an answer, as I think passing info in bits and pieces via comments is not a good practice.
And speaking of practices, here's why you should add all your scripts and styles using wp_enqueue_script() and wp_enqueue_style() in WordPress.
The key behind WordPress's success is it's flexibility. Anyone can extend or restrain it, by adding or removing functionality to/from it. In doing so, a lot of people (namely plugin or theme authors, or even the DIY guy not knowing much about web, just trying out different cool scripts he found last night) at some point decide to use a certain asset. A font library, a JavaScript library or a CSS framework.
Most of these assets, if loaded multiple times are going to conflict with themselves, especially if different versions of them are loaded. And this is why you should always tell WordPress what you are using. Because if it finds out another plugin is using the same library, it will only load the asset once and provide it for every script/plugin or whatever else needs it.
That's the main reason. One of the secondary reasons, which applies in your case, is that if you decide to move this WP to another address, it's smart enough to dynamically rebuild the urls to its assets so they work in each installation.
And i'm only scratching the surface here.

Are full links when linking resources worse than paths?

The question is very simple and even tho I might get downvoted into oblivion for it, I can't find a good search query for this.
If I link images, stylesheets, scripts and other things with the full website url (http://url.tld/css/style.css) instead of path (css/style.css) , are the visitors affected negatively? Is there any difference?
The html page is on the same link as the resource, so we're not talking about external resources.
This only makes a difference if you change your domain name. You cannot simply transfer the scripts over but have to change each line or the include of those files then.
One small thing to keep in mind: Your string will be longer and so your file will be a very bit bigger in size but it doesn't really matter.
Either won't affect visitors. Specifying the protocol might cause problems in the future if your users can switch between http and https. Specifying the folder also means changes when you move the site. So best to use relative

Changing CMS to wordpress will change my URLs, how to cope

I am moving a well ranked eCommerce site to WordPress, but the old site has URLs that all end in .htm. I want to avoid breaking links, and avoid losing pagerank, but Wordpress removes periods from custom URLs, so it seems that ending in .htm will not be an option.
What is the best way to handle this situation in terms of SEO? Roughly preserve the sitemap with different URLs and 301 redirect? Use some kind of URL rewriting trick? Any help is much appreciated.
Check out this plugin: http://wordpress.org/plugins/redirection/
You can also manually add redirects to your .htaccess I am not sure if that would work in your case though. Worth a shot, nevertheless. Make sure you put these rules after Wordpress' own block of rules
Redirect 301 /about.html http://yoururl.com/about/
Redirect 301 /contact.html http://yoururl.com/contact/