Go Back   CodingForums.com > :: Client side development > HTML & CSS

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 02-03-2010, 04:35 PM   PM User | #1
cellshade
New to the CF scene

 
Join Date: Sep 2009
Posts: 9
Thanks: 4
Thanked 0 Times in 0 Posts
cellshade is an unknown quantity at this point
Unhappy 404 - something wrong with my script, they say...

Hey guys.

I am not a big coder, but I thought I was doing it right.
Problem is my 404.html.

If you go on http://www.apptranslation.com and you want to access a site which is not a directory, like /123, you will see the 404.html error page.
Unfortunately, if you ad another forward slash like .com/123/456 the 404 does not show up correctly.

I called Godaddy because I thought that was a problem with the directory settings but they told me they had a look into my script and something is messed up ... weeeeelll ... great ... I have no idea :-(
Any Ideas?
PHP Code:
<head>

<
meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />

<
title>404 AppTranslation.com</title>

<
meta name="description" content="AppTranslation | High quality, affordable, fast translations for your mobile application" />
<
meta name="keywords" content="404,page,not,found,AppTranslation.com" />
<
meta http-equiv="Content-Type" content="application/xhtml+xml; charset=utf-8" />
<
meta name="robots" content="block,follow" />

<
link rel="shortcut icon" type="image/x-icon" href="http://www.apptranslation.com/favicon.ico">
<
link rel="icon" type="image/vnd.microsoft.icon" href="http://www.apptranslation.com/favicon.ico"/>
<
link href="stylecss/aptr.css" rel="stylesheet" type="text/css" />
<
style type="text/css">
<!--
a:link {
    
text-decorationnone;
}
a:visited {
    
text-decorationnone;
}
a:hover {
    
text-decorationunderline;
}
a:active {
    
text-decorationnone;
}
-->
</
style></head>
<
body link="#024C5C" vlink="#024C5C" alink="#024C5C" class="oneColElsCtr">
<!-- 
starting css grid -->
<
div id="container">
  <
div id="header">
    <
div id="tweety">
      <
h2><a href="http://twitter.com/apptranslation">"follow_us</a></h2>
    </div>
    <h1><a href="
http://www.apptranslation.com">Home</a></h1>
    
<ul>
      <
li id="products"><a href="http://www.apptranslation.com/products/">AppTranslation Products</a></li>
      <
li id="benefits"><a href="http://www.apptranslation.com/benefits/">ApppTranslation Benefits</a></li>
      <
li id="references"><a href="http://www.apptranslation.com/references/">AppTranslation References</a></li>
    </
ul>
</
div
<
div id="page404">
  <
div id="page_404_text">
    <
p>The thing iswe’ve tried looking for the page you requested on our serversbut we simply can’t find it.</p>
    <
p>&nbsp;</p>
    <
p>The good news iswe left you the main navigation bar on the top so you can access the content of the main page.</p>
    <
p>&nbsp;</p>
    <
p>AppTranslation.com</p>
  </
div></div>


  <
div id="footer">
    <
div id="hello">
      <
h7><a href="mailto:hello@apptranslation.com">contact</a></h7>
    </
div>
  <
a href="http://www.apptranslation.com/impressum/">Impressum</a> | <a href="http://www.apptranslation.com/links/">Links</a> | </div>
</
div><!-- closing css grid -->
<
script type="text/javascript">
var 
gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." "http://www.");
document.write(unescape("%3Cscript src='" gaJsHost "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
</script>
<script type="text/javascript">
try {
var pageTracker = _gat._getTracker("UA-12593932-1");
pageTracker._trackPageview();
} catch(err) {}</script>
</body>
</html> 

Last edited by cellshade; 02-03-2010 at 05:42 PM.. Reason: SOLVED :-) !!
cellshade is offline   Reply With Quote
Old 02-03-2010, 04:43 PM   PM User | #2
ahayzen
Regular Coder

 
ahayzen's Avatar
 
Join Date: Jun 2009
Posts: 110
Thanks: 8
Thanked 11 Times in 11 Posts
ahayzen is an unknown quantity at this point
I have exactly the same problem on my website.
What it is, is when the 404 page is run it looks for the source files -such as images and style sheets.

This is fine when the error is in the first directory or yourdomain.com/xxx. But when there is a folder and 404 error the code can't 'find' the source files.

For example i do yourdomain.com/xx/xxx the 404 comes up looks for the images directory, /images/. But instead of going yourdomain.com/images it goes yourdomain.com/xx/images/ so it can't find the images or files.

Andy
ahayzen is offline   Reply With Quote
Users who have thanked ahayzen for this post:
cellshade (02-03-2010)
Old 02-03-2010, 04:48 PM   PM User | #3
ahayzen
Regular Coder

 
ahayzen's Avatar
 
Join Date: Jun 2009
Posts: 110
Thanks: 8
Thanked 11 Times in 11 Posts
ahayzen is an unknown quantity at this point
To fix this error you need to get the location of the source files to be relative to the root folder not the folder in the URL. Hopefully someone else will help here.

Andy
ahayzen is offline   Reply With Quote
Users who have thanked ahayzen for this post:
cellshade (02-03-2010)
Old 02-03-2010, 04:50 PM   PM User | #4
ahayzen
Regular Coder

 
ahayzen's Avatar
 
Join Date: Jun 2009
Posts: 110
Thanks: 8
Thanked 11 Times in 11 Posts
ahayzen is an unknown quantity at this point
Hang on i've found it. Try putting a / before your locations this should fix the error.
so href="stylecss/aptr.css"
becomes href="/stylecss/aptr.css"
ahayzen is offline   Reply With Quote
Users who have thanked ahayzen for this post:
cellshade (02-03-2010)
Old 02-03-2010, 05:38 PM   PM User | #5
cellshade
New to the CF scene

 
Join Date: Sep 2009
Posts: 9
Thanks: 4
Thanked 0 Times in 0 Posts
cellshade is an unknown quantity at this point
Quote:
Originally Posted by ahayzen View Post
Hang on i've found it. Try putting a / before your locations this should fix the error.
so href="stylecss/aptr.css"
becomes href="/stylecss/aptr.css"

Hey buddy.. thanks for the quick solve.
Let me try it here :-)

Would be amazing if this would sort out the probs :-)
I'll let you know!

Cheers
cellshade is offline   Reply With Quote
Old 02-03-2010, 05:41 PM   PM User | #6
cellshade
New to the CF scene

 
Join Date: Sep 2009
Posts: 9
Thanks: 4
Thanked 0 Times in 0 Posts
cellshade is an unknown quantity at this point
Hooooooooooly shi*!! How awesome is that!
Not only that you helped me out within 5 mins :-) but you've definitely solved the problem ..

Yes .. with putting a "/" before stylesheet it worked out fine :-)
Thanks again !!

Woohooo!
cellshade is offline   Reply With Quote
Reply

Bookmarks

Tags
404, error behavior, godaddy.com

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

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 On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 01:25 PM.


Advertisement
Log in to turn off these ads.