Enjoy unlimited access to all forum features for FREE! Optional upgrade available for extra perks.

Website help

Joined
Oct 13, 2008
Posts
8,132
Reaction score
665
Hi,

I downloaded an html theme from w3layouts.com, edited it to my liking and uploaded the new site, but it appeared on the page as if the style sheet code was missing, I then pasted the style sheet code between <style></style> tags and added it to the head section in the html of the index page instead, and some of the styling appeared after doing that, but most of it was still not displaying properly.

I've downloaded the theme again and uploaded it to a different domain, just in case I made an error when editing the style sheet somewhere, but the new upload of the original unedited theme is still not displaying properly.

I've put the unedited theme on [link removed as issue resolved for this problem] and hope someone can take a look at it and let me know why it's not displaying? That url only works with www. in front of it, I get a 500 internal error if visiting that without the www. as I haven't set up a .htaccesss file for it.

Alternatively, if anyone has some time on their hands and wants to download the theme, it's here
 
Last edited:
Having had a quick look, I don't think it's a problem with the theme. There seems to be an issue with your server serving files (css, js) from the root.

eg: /css/bootstrap.css gives a 500 error.

If you fix that, the styling will be fixed.

Hope that helps,
Dave
 
Thanks, just noticed where you posted the css file urls giving errors, and looking at the source code on the index page it has those 3 like this:

<link href="css/bootstrap.css" rel='stylesheet' type='text/css' />
<link href="css/style.css" rel='stylesheet' type='text/css' />
<link href="css/font-awesome.css

I though that didn't look right so I removed the css/ part from each and the home page now displays alomost correctly, are those css/ bits supposed to be there or not?
 
Same with this line in the code:

<link href="css/animate.css" rel="stylesheet" type="text/css" media="all">

Removing the css/ before animate.css make the animations work, so guessing that's the problem, if so, not sure why they included the css/ in front of the other code.
 
The "css/bootstrap.css" is just a path relative to wherever the base href is set (normally /)

so on your server, you should have a "css" directory in your home directory containing a file called bootstrap.css within it. If that does exist, then it sounds like it could be a problem with permissions. You may need to chmod the files or folders to make them read/executable to the server process.
 
Ahh, I see, I don't have any named directory like "css" in my home directory like, all site files are lumped in together on one directory page without folders. as you suggest, that'll be why they included the css/ bit in the lines of code then, thanks for all the help.
 
no problem - you'll need to create the "js" directory too and move the associated javascript files into there also
 
Ok, next question :)

Now that the css stuff is figured out, I edited the html files to remove the css/ from the source code and then my new website worked fine.

Now I have another problem, the site only works if you go to it with www. in front of the url, so I added a .HTACCESS file hoping that would redirect it to the www. version, but after adding the HTACCESS file, the site doesn't resolve with or without the www. so I need to remove it, but can't see that file listed anywhere, then I found this via Google which says files like that which begin with a dot are hidden:

Why Can’t I Find My .htaccess File?
On most file systems, file names that begin with a dot ( . ) are hidden files. This means they are not typically visible by default.

But they aren’t hard to get to. Your FTP client or File Manager should have a setting for “show hidden files.” This will be in different places in different programs, but is usually in “Preferences”, “Settings”, or “Folder Options.” Sometime you’ll find it in the “View” menu.

Any ideas how to remove it, as I can't see anything called hidden files etc?

[Edit]

Found settings button now, right in front of my bloody eyes and removed the HTACCESS file, but site still not resolving.
 
Last edited:
Do you have shell access to your server?

If you can ssh into the server, then at the prompt

$ls -a

Should show the .htaccess file

You can then issue a

$rm .htaccess

to remove it
 
Sorry mate, was just editing my last post to say this when you replied:

Found settings button now, right in front of my bloody eyes and removed HTACCESS file, but site still not resolving.
 
This is the content of the HTACCESS file:

RewriteEngine On
RewriteCond %{HTTP_HOST} !^www\.
RewriteRule ^(.*)$ http://www.%{HTTP_HOST}/$1 [R=301,L]

I want anyone going to domain.co.uk to go to www.domain.co.uk
 
Ok I think the regular expression is slightly off, try this

Code:
RewriteEngine On
RewriteCond %{HTTP_HOST} ^yourdomain.com [NC]
RewriteRule ^(.*)$ http://www.yourdomain.com/$1 [L,R=301]
 
Thanks, changed the file to that but still not resolving and showing double domain in the url if going to it without the www. Got to pop out for 1/2 hour and will close browser for now to see if cache clears and flush dns
 
if you're using chrome, you could press F12 dev tools, check the "disable cache"
 
Try getting rid of the variable for host, type the actual domain in there instead.

Code:
RewriteEngine On
RewriteCond %{HTTP_HOST} ^domain.co.uk$ [NC]
RewriteRule (.*) https://www.domain.co.uk/$1 [R=301,L]

EDIT: Scrap that, try this it's much better and makes sure that every request gets through whether it's HTTPS or not.

Code:
RewriteCond %{HTTP_HOST} ^[^.]+\.[^.]+$
RewriteCond %{HTTPS}s ^on(s)|
RewriteRule ^ http%1://www.%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
 
To be fair, I don't know why you'd want people to be redirected to www. It used to matter back in the day, but it doesn't matter at all now. I think it looks much better without the www
 
@cyberpunk, I'm on Firefox, but I did just check on Chrome and the site doesn't resolve on there either, clicked F12 but don't see anything for disabling cache under dev tools/settings

@Ben Thomas, already tried that mate, @cyberpunk posted the same above.
 

The Rule #1

Do not insult any other member. Be polite and do business. Thank you!

Featured Services

Sedo - it.com Premiums

IT.com

Premium Members

AucDom
UKBackorder
Register for the auction
Acorn Domains Merch
MariaBuy Marketplace

New Threads

Domain Forum Friends

Other domain-related communities we can recommend.

Our Mods' Businesses

Perfect
Service
Laskos
*the exceptional businesses of our esteemed moderators
Top Bottom