Hi, My name is john and new to this forum so hi to all.
I am no web designer but recently created my own website for my electrical business that I run.
I have run into a problem which I am scratching my head at and ready to throw the machine through the window. I have written all the code and uploaded it to our web hosting company. All was working fine but every now and again you can not access our website I have contacted the hosting company and they say there is nothing wrong their side. I have taken off Google tracking code in case that was causing problems but to no avail. Does anyone have any ideas ?
The links pages from “Electrical” onwards direct the “Home” to “Original index.html” when they should direct to “index.html”. Maybe that’s the problem you’re seeing?
Have you considered using a simple PHP ‘include’ statement for your navigation? It would eliminate errors like these and make changes to your navigation easier.
I know the links are not right at the moment they were before and I was still having problems, they are wrong at the moment due to the fact I have been playing with it so much .
php ? I will look into this whatever it is …thanks
[FONT=Verdana]I tried your site about an hour ago, and it loaded immediately. I tried it again just now, and it loaded eventually. You might want to take a look at this thread, which discusses a similar problem.
PHP is a red herring here. I’m not saying don’t learn it - it’s very useful, even if only for includes, as zot suggested, but it won’t solve this problem. If this is the only sight you’re ever likely to build, then you can live quite happily without PHP. [/FONT]
thanks for your input. it is the only web site I am going to build and I will check out the other thread. I have removed all pages except for the index page and I am still having issues. Thanks though
Apache web servers are generally set to use case sensitive URL and files so: Index.htm differs to index.htm as does INDEX.htm they’d be treated as 3 ‘different files’ so ensure your files match the Case Sensitivity of your hyperlinks and file names, etc. Usally it makes sense to use all lower-case so it’s easier to remember.
Since space characters are not allowed in URLs, you have to encode them usually for the white space in a filename; %20 would be used, e.g. for a file with a space called: ‘some file.htm’ <a href="some%20file.htm>XYZ</a> is an appropriate encoding.
OK thanks I checked the white spaces and they are filled with %20 and I will make sure all links match with case sensitivity. I have just tried a simple web page with no links see if that works
Then its a problem related to your server, im sure. You might check with the hosting company then, it`s not normal to work only sometimes. Maybe your hosting was performing maintenance ?
As mentioned in my previous post, the following link script is working on my server:
Start with a page that works and keep checking back to ensure your server is working OK.
Copy and paste the following script to a new text.html page:
<!DOCTYPE html>
<html lang="en">
<head>
<title>Bradtech Electrical and security Services</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<link href="style1.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<header>
<h1>Bradtech Group</h1>
</header>
<nav>
<ul id="nav">
<li><a href="index.html">Home</a></li>
<li><a href="aboutus.html">About Us</a></li>
<li><a href="ourservices.html">Our Services</a></li>
<li><a href="electrical.html">Electrical</a></li>
<li><a href="alarms.html">Alarms</a></li>
<li><a href="cctv.html">CCTV</a></li>
<li><a href="outsidelighting.html">Outside Lighting</a></li>
<li><a href="pricing.html">Pricing</a></li>
<li><a href="downloads.html">Downloads</a></li>
<li><a href="contactus.html">Contact Us</a></li>
</ul>
</nav>
<p style='text-align:center'>
<img
src="images/main.jpg"
style='width:700px; height:292px'
alt="main image of electrical items"
/>
</p>
<p>We are a professional and reliable company located in Kinoulton, Nottinghamshire. We provide a range of
electrical and security services for Nottingham and surrounding areas.</p>
<p>We have been established for more than 18 years and we endeavour to provide a quality service.</p>
<p>Feel free to view our services page for a comprehensive list of all the work
that we undertake. If you can not find what you are looking for please <a href="contactus.html"
>contact us.</a></p>
<p>If you would like to be kept up to date with news and special offers, please check our facebook page.</p>
<div id='footer' style='margin:2em 0; text-align:center; padding:1em'>
<h1>Footer Stuff goes here</h1>
</div>
<!-- DEBUG STUFF IGNORE AND DO NOT COPY -->
<div style='padding:1em; margin:0 auto; background-color:#cdffff; border:solid 1px #090'>
<a href='http://validator.w3.org/check?uri=http%3A%2F%2Fwww.johns-jokes.com%2Fdownloads%2Fsp-b%2Fbradtechgroup%2Findex.html'>
http://validator.w3.org/Validator Service
</a>
<br />
<a href="http://jigsaw.w3.org/css-validator/check/referer">
<img style="border:0;width:88px;height:31px; margin:1em auto 0"
src="http://jigsaw.w3.org/css-validator/images/vcss-blue"
alt="Valid CSS!" />
</a>
</div>
</body>
</html>
Yes it works fine for me as well, all the links are also working. The only problem I could see was the link in the header which is inconsequential, does not affect the site operation so do not expect the OP to return.
thanks for your input. it is the only web site I am going to build and I will check out the other thread. I have removed all pages except for the index page and I am still having issues. Thanks though
Hi guys, web hosting company moved me to another server, which did sort out the problem I hope. Just got to tidy it up a little and make sure all the pages go through validator ok.