1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

Links are dropping .html and can't find page

Discussion in 'HTML & Website Design' started by jeffduck, Dec 20, 2013.

  1. #1
    After downloading a rather nice HTML5/CSS3 template with a fully functioning demo, I'm finding that any link that I click on doesn't find the page. The links are clear and simple such as
    <a href="features.html">Features</a>
    Code (markup):
    but no matter what I do, the .html gets dropped from the URL so the link goes to
    file:///Z:/xampp/htdocs/crateproNEW/features
    Code (markup):
    (note, no .html) and the page can't be found.

    My html and php skills are 'pretty OK' but I go years between coding so I forget the basics. This problem could be pretty simple but I don't think so.

    I've run the files locally, run them under xampp, added DOCTYPE details which didn't exist, removed the .htaccess file, copied over a different .htaccess file from a working site, run the files from various drives, etc. I've had absolutely no luck.

    This seems so basic that I think I must be missing something simple! Any idea what?

    Thanks in advance for the help!
     
    Solved! View solution.
    jeffduck, Dec 20, 2013 IP
  2. kk5st

    kk5st Prominent Member

    Messages:
    3,497
    Likes Received:
    376
    Best Answers:
    29
    Trophy Points:
    335
    #2
    Are you opening the page in your browser by addressing
    http://localhost/crateproNEW/
    Code (markup):
    If not, do so and test the links again.

    cheers,

    gary
     
    kk5st, Dec 21, 2013 IP
  3. jeffduck

    jeffduck Greenhorn

    Messages:
    9
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    11
    #3
    Thanks for the reply Gary.

    Entering that will load the home page but then I have the same problem ; no more '.html'

    I decided to move only the
    home.html
    Code (markup):
    and
    features.html
    Code (markup):
    (that I'm linking to) without any CSS or javaScript. That DID work normally.

    Can there be something in the CSS or javaScript?

    There's about 10 javaScript files with jquery 1.7.1 - All are minified. My CSS is real rough but I didn't notice anything that looked like it would do this.
     
    jeffduck, Dec 21, 2013 IP
  4. kk5st

    kk5st Prominent Member

    Messages:
    3,497
    Likes Received:
    376
    Best Answers:
    29
    Trophy Points:
    335
    #4
    I can't think of anything css would or could do to to change the protocol (the http:// part) which is presumed by the href attribute. Javascript would be my next suspect. I am not familiar with the xampp stack, but understand certain security methods are disabled in favor of local development. My own is a secured lamp stack on a modern os, so take my mental meandering with a grain of salt.

    If you're testing in IE, switch to Firefox for example. IE is so much better than ever before, but MSFT still has weird ideas on being "helpful". In FF, use the Web Developer addon to disable javascript to test whether that makes a difference.

    Beyond that it will be helpful if you could upload the site to a public server. Running links through their paces and inspecting the source for ourselves would be the next step.

    cheers,

    gary
     
    kk5st, Dec 21, 2013 IP
  5. jeffduck

    jeffduck Greenhorn

    Messages:
    9
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    11
    #5
    I tried it on Chrome, FF and Safari but I didn't think to disable javaScript.

    I think posting it is a good idea but first I think I need to contact the person I purchased it from. I already tried once and didn't get a response but I don't want to post someones template until I've provided a very good opportunity for him to address the problem.

    Thanks again. I'll either post the results if I learn the cause or if not, I'll post the files
     
    jeffduck, Dec 21, 2013 IP
  6. jeffduck

    jeffduck Greenhorn

    Messages:
    9
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    11
    #6
    I think I have to give up with this template. Because of all the color options, the full zip file is about 150Mb. I can break it down and take out a lot of duplicate content but if I take out too much, I think the problem won't be identifiable. The developer wrote a nice wrapper html page that allows you to go through and see all the different colored sub-themes. While it all sounds pretty straight forward, I think it's part of the problem and he probably just needed to add a few lines of instructions on how to extract the specific files needed. With 10+ near exact duplicates and mysterious 'dev' folders, there's a lot of wasted space.

    That may sound confusing but I can't think of a good way to explain it without showing it. Since I'm giving up on it, I think it just needs to be dropped. Too bad though because in the sample, they're very nice looking and smooth templates.

    Thanks again for the help but I'm going to move on and find another template that comes from someone who answers their email.
     
    jeffduck, Dec 30, 2013 IP
  7. GORF

    GORF Well-Known Member

    Messages:
    224
    Likes Received:
    21
    Best Answers:
    3
    Trophy Points:
    165
    #7
    Check to see if there is a .htaccess file in the site root folder.
    It may be rewriting the links improperly.
    You can just rename it to test.
     
    GORF, Dec 30, 2013 IP
  8. Julien@Hostabulous

    Julien@Hostabulous Active Member Affiliate Manager

    Messages:
    65
    Likes Received:
    10
    Best Answers:
    1
    Trophy Points:
    95
    #8
    Just to make sure, are your running this locally or on your hosting account?
     
    Julien@Hostabulous, Dec 30, 2013 IP
  9. deathshadow

    deathshadow Acclaimed Member

    Messages:
    9,732
    Likes Received:
    1,998
    Best Answers:
    253
    Trophy Points:
    515
    #9
    Which laughably is twice my ideal target size for a template's HTML+CSS+SCRIPTS+IMAGES without any compression involved...

    What you might want to try is skipping the whole scam artist BS of off the shelf templates, start by getting semantic markup of your content with a logical document structure, then bend it to your will with CSS for an elastic semi-fluid and responsive layout -- instead of trying to shoehorn your content needs into something most likely sleazed out by an inept halfwit "designer" who didn't know enough about HTML, CSS, Scripting, emissive colourspace or accessibility to be designing but two things.

    Sorry, but much like the whole dicking around drawing pretty pictures before you have markup idiotic nonsense, the idea that you can take some off the shelf template and cram content into it is also IMHO putting the cart before the horse, and a completely back-assward way of building a site... and the places that promote said nonsense (template monster, themeforest, etc, etc) are some of the biggest hives of scum and villainy this side of the SEO sleazeballs.
     
    deathshadow, Dec 31, 2013 IP
  10. jeffduck

    jeffduck Greenhorn

    Messages:
    9
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    11
    #10
    Deathshadow - generally I agree with you. I've written about 30 or so sites. Mostly from scratch because I generally don't care much for templates either and I prefer using PHP. But this template is a better quality than others that I've seen. It's very clean and flexible. As Gorf mentioned, I think the issue is more likely the htaccess and the fact that they don't just provide the template you want but you get the files in a folder structure that matches what's on the website (http://chocotemplates.com/demo/?template=web-lion) including the theme selector on the left and unusual ~dev and html folders.

    (BTW - I have some medical issues though that affect my memory and have to pretty much relearn everything each time I do a new site. This is why I've created a handful of sites but still have problems with the basics.)

    I found out that I have the Weebly site builder available for free via my host. Although it doesn't provide as smooth of transitions as this template does, I'm expecting it should be fast to use and result in a good looking site so I'll probably give it a try.

    Gorf - Here's the content of the .htaccess. I have tried including it and tried removing it.
    Options +Includes
    AddHandler server-parsed .shtml .html .htm
    Code (markup):
    Julien - Yes, I've tried running the files every way that I could think of.

    I'll send a PM with a link to the entire template to everyone who commented here in case you want to look into it further.

    Thanks again to all for the feedback.
     
    jeffduck, Jan 1, 2014 IP
  11. deathshadow

    deathshadow Acclaimed Member

    Messages:
    9,732
    Likes Received:
    1,998
    Best Answers:
    253
    Trophy Points:
    515
    #11
    oops, I said twice -- I meant TWENTY times... ouch, that's bad.
     
    deathshadow, Jan 1, 2014 IP
  12. wiicker95

    wiicker95 Well-Known Member

    Messages:
    438
    Likes Received:
    37
    Best Answers:
    10
    Trophy Points:
    100
    #12
    He wrote 150Mb I think. It's more like two hundred in that case. But yeah, it's bad.
     
    wiicker95, Jan 1, 2014 IP
  13. Julien@Hostabulous

    Julien@Hostabulous Active Member Affiliate Manager

    Messages:
    65
    Likes Received:
    10
    Best Answers:
    1
    Trophy Points:
    95
    #13
    Jeff I uploaded the default template to test on our server, and it looks like its working as intended. check out: http://jeff.hostabulous.com - Did you edit something on your side?
     
    Julien@Hostabulous, Jan 2, 2014 IP
  14. jeffduck

    jeffduck Greenhorn

    Messages:
    9
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    11
    #14
    I'm having the problems right out of the box.
    From here:
    upload_2014-1-2_12-14-56.png

    Clicking on About, brings me here:
    upload_2014-1-2_12-15-27.png
    From here, if I add .html to the URL, then I DO get to the page

    I seem to have screwed something up on my local web server now, but when I was testing it earlier I got exactly the same thing with Apache. Also have the problem when using Live Code in Dreamweaver.
    upload_2014-1-2_12-26-29.png

    It still drops the .html then can't find the page:
    upload_2014-1-2_12-27-16.png

    I've tried different themes with the same result BUT everything works perfectly when I use html/index.html and click on the links that are provided in the menu on that page.
     
    jeffduck, Jan 2, 2014 IP
  15. #15
    I found the issue you have locally, there is a function in functions.js that replaces xxx.html to xxx, if you want to design your site on your computer, just remove that js script. You will have missing functions but it should work.
    When you mouseover the buttons you will see it goes lile /about, instead of /about.html. So locally your computer apache doesnt know how to parse this file.
     
    Julien@Hostabulous, Jan 2, 2014 IP
    GORF likes this.
  16. jeffduck

    jeffduck Greenhorn

    Messages:
    9
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    11
    #16
    Ha! Yep that does it!

    Thanks much Julien (and everyone else)!
     
    jeffduck, Jan 2, 2014 IP
  17. Julien@Hostabulous

    Julien@Hostabulous Active Member Affiliate Manager

    Messages:
    65
    Likes Received:
    10
    Best Answers:
    1
    Trophy Points:
    95
    #17
    Pleasure Jeff, good luck :)
     
    Julien@Hostabulous, Jan 2, 2014 IP