# CSS may not be applying to my page

**URL:** <https://forums.realmacsoftware.com/t/css-may-not-be-applying-to-my-page/6032>\
**Category:** RapidWeaver Classic\
**Created:** [March 26, 2016, 3:06am UTC](https://forums.realmacsoftware.com/t/css-may-not-be-applying-to-my-page/6032 "2016-03-26T03:06:45Z")\
**Posts on this page:** 20\
**Page:** 2

<div class="post-metadata">

**Author:** ![cynthia](https://dub1.discourse-cdn.com/flex005/user_avatar/forums.realmacsoftware.com/cynthia/32/225_2.png) [@cynthia](https://forums.realmacsoftware.com/u/cynthia)\
**Post date:** [March 27, 2016, 11:21am UTC](https://forums.realmacsoftware.com/t/css-may-not-be-applying-to-my-page/6032/21 "2016-03-27T11:21:00Z")

</div>

Hello,

I deleted the 404 page and the errors folder etc. and started over. I created a 404.html page as you said at the root, and set the permissions to 755. This is what I put at the end of the .htaccess file:

RewriteEngine on  
ErrorDocument 404 /404.html

If I go to the website, and enter an invalid address at the end of the URL, the 404 page seems to be working OK. So I’m really happy to have that part of this finally working! The problem I am still having, is recently I rebuilt and republished this website and omitted a lot of old pages that were getting obsolete. When I go to Google and search the site, it still shows many of those obsolete pages. If I click on one, the new 404 page shows up, but the image doesn’t show and it looks like it has no formatting. I’ll try to include an example link here. [Google link.](http://www.educationoasis.com/curriculum/assessment/) I’ve done some 301 redirects, but there are too many old pages to do them all. Do you know what might be causing this to look OK from the site directly, but not from a search? I think that’s where the 404 would be the most useful, so I’d really like to get it working there somehow. Sorry this is so long!

---

<div class="post-metadata">

**Author:** ![cynthia](https://dub1.discourse-cdn.com/flex005/user_avatar/forums.realmacsoftware.com/cynthia/32/225_2.png) [@cynthia](https://forums.realmacsoftware.com/u/cynthia)\
**Post date:** [March 27, 2016, 11:29am UTC](https://forums.realmacsoftware.com/t/css-may-not-be-applying-to-my-page/6032/22 "2016-03-27T11:29:08Z")

</div>

I like your Pizza 404 page, it’s cute. I’m glad it’s working for you! Mine is finally working, but only by typing in a wrong URL at the site, and not from a link of an obsolete page at Google. I put what I did last in a post below. I’m about ready to throw in the towel, but I sincerely thank you for all the time and effort you have given to this to help me!

---

<div class="post-metadata">

**Author:** ![thang](https://dub1.discourse-cdn.com/flex005/user_avatar/forums.realmacsoftware.com/thang/32/303_2.png) [@thang](https://forums.realmacsoftware.com/u/thang)\
**Post date:** [March 27, 2016, 4:53pm UTC](https://forums.realmacsoftware.com/t/css-may-not-be-applying-to-my-page/6032/23 "2016-03-27T16:53:30Z")

</div>

When I click on your home or contact buttons in Nav i get taken to the 404 page, as well as if i enter http:/kentwoodshavings.co.uk or click on the site title. In order to view your home page i have to enter http:/kentwoodshavings.co.uk/index.html Just wondering if that’s the behavior you intended.

---

<div class="post-metadata">

**Author:** ![swilliam](https://dub1.discourse-cdn.com/flex005/user_avatar/forums.realmacsoftware.com/swilliam/32/14799_2.png) [@swilliam](https://forums.realmacsoftware.com/u/swilliam)\
**Post date:** [March 27, 2016, 5:08pm UTC](https://forums.realmacsoftware.com/t/css-may-not-be-applying-to-my-page/6032/24 "2016-03-27T17:08:32Z")

</div>

@cythhia, read my post above.  
Step 1. Try putting the full url to the 404 page in the .htaccess, see if that clears things up.  
If that works then at the **bottom** of your .htaccess put the full set of steps in from the post above origionally from doobox.

RewriteEngine on  
RewriteCond %{REQUEST\_FILENAME} !-f  
RewriteRule . /404.html [L,R=301]

Scott

---

<div class="post-metadata">

**Author:** ![cynthia](https://dub1.discourse-cdn.com/flex005/user_avatar/forums.realmacsoftware.com/cynthia/32/225_2.png) [@cynthia](https://forums.realmacsoftware.com/u/cynthia)\
**Post date:** [March 27, 2016, 8:14pm UTC](https://forums.realmacsoftware.com/t/css-may-not-be-applying-to-my-page/6032/25 "2016-03-27T20:14:52Z")

</div>

I did that last night, and I tried it again now. When I add the three lines at the bottom of the .htaccess file, the links stop working on the site, and so did the search box. When you click a link in the menu bar, or even most of the text links, or did a search, they all lead back to the 404 page, so I had to remove that from the .htacccess file. Currently I still just have:

RewriteEngine on  
ErrorDocument 404 /404.html

on the bottom, but it still doesn’t work correctly, but thanks!

---

<div class="post-metadata">

**Author:** ![swilliam](https://dub1.discourse-cdn.com/flex005/user_avatar/forums.realmacsoftware.com/swilliam/32/14799_2.png) [@swilliam](https://forums.realmacsoftware.com/u/swilliam)\
**Post date:** [March 27, 2016, 8:19pm UTC](https://forums.realmacsoftware.com/t/css-may-not-be-applying-to-my-page/6032/26 "2016-03-27T20:19:15Z")

</div>

Did you try the full url in line 2 of your .htaccess entry?

---

<div class="post-metadata">

**Author:** ![cynthia](https://dub1.discourse-cdn.com/flex005/user_avatar/forums.realmacsoftware.com/cynthia/32/225_2.png) [@cynthia](https://forums.realmacsoftware.com/u/cynthia)\
**Post date:** [March 27, 2016, 8:38pm UTC](https://forums.realmacsoftware.com/t/css-may-not-be-applying-to-my-page/6032/27 "2016-03-27T20:38:22Z")

</div>

Yes, I tried that too.

---

<div class="post-metadata">

**Author:** ![swilliam](https://dub1.discourse-cdn.com/flex005/user_avatar/forums.realmacsoftware.com/swilliam/32/14799_2.png) [@swilliam](https://forums.realmacsoftware.com/u/swilliam)\
**Post date:** [March 27, 2016, 8:45pm UTC](https://forums.realmacsoftware.com/t/css-may-not-be-applying-to-my-page/6032/28 "2016-03-27T20:45:13Z")

</div>

If thats the case then I am stumped…  
the very first line of my .htaccess file is:  
ErrorDocument 404 [http://www.walkinartcenter.org/404.html](http://www.walkinartcenter.org/404.html)

my error doc is: /public\_html/404.html (/public\_html) is my doc\_root

Originally I only had ./404.html as the path in my .htaccess file and I was getting the same behavior you are experiencing. Once I put the full path in (case counts on my server) it worked from anywhere.

---

<div class="post-metadata">

**Author:** ![swilliam](https://dub1.discourse-cdn.com/flex005/user_avatar/forums.realmacsoftware.com/swilliam/32/14799_2.png) [@swilliam](https://forums.realmacsoftware.com/u/swilliam)\
**Post date:** [March 27, 2016, 8:47pm UTC](https://forums.realmacsoftware.com/t/css-may-not-be-applying-to-my-page/6032/29 "2016-03-27T20:47:52Z")

</div>

yours works from: [http://www.educationoasis.com/badURL](http://www.educationoasis.com/badURL) but not from [http://www.educationoasis.com/whatever/badURL](http://www.educationoasis.com/whatever/badURL)

Thats exactly what mine was doing before I put the full url in.

Just to be sure, you are on an Apache server correct?

---

<div class="post-metadata">

**Author:** ![manofdogz](https://dub1.discourse-cdn.com/flex005/user_avatar/forums.realmacsoftware.com/manofdogz/32/26314_2.png) [@manofdogz](https://forums.realmacsoftware.com/u/manofdogz)\
**Post date:** [March 27, 2016, 8:49pm UTC](https://forums.realmacsoftware.com/t/css-may-not-be-applying-to-my-page/6032/30 "2016-03-27T20:49:02Z")

</div>

eek - definitely not! i just set this up as a test late yesterday so will check…

---

<div class="post-metadata">

**Author:** ![thang](https://dub1.discourse-cdn.com/flex005/user_avatar/forums.realmacsoftware.com/thang/32/303_2.png) [@thang](https://forums.realmacsoftware.com/u/thang)\
**Post date:** [March 27, 2016, 8:50pm UTC](https://forums.realmacsoftware.com/t/css-may-not-be-applying-to-my-page/6032/31 "2016-03-27T20:50:37Z")

</div>

yeah i thought a heads up on that might be helpful.

---

<div class="post-metadata">

**Author:** ![manofdogz](https://dub1.discourse-cdn.com/flex005/user_avatar/forums.realmacsoftware.com/manofdogz/32/26314_2.png) [@manofdogz](https://forums.realmacsoftware.com/u/manofdogz)\
**Post date:** [March 27, 2016, 8:53pm UTC](https://forums.realmacsoftware.com/t/css-may-not-be-applying-to-my-page/6032/32 "2016-03-27T20:53:40Z")

</div>

Thanks for pointing this out - much appreciated. Shows how you should take time over these things - I was only interested in the redirect from a non-existent pages and sub-pages - not thorough enough. Fortunately it’s my smallest and least used site - which is why I tested on it. deleted htaccess for now and will take another look. Thanks again!

---

<div class="post-metadata">

**Author:** ![manofdogz](https://dub1.discourse-cdn.com/flex005/user_avatar/forums.realmacsoftware.com/manofdogz/32/26314_2.png) [@manofdogz](https://forums.realmacsoftware.com/u/manofdogz)\
**Post date:** [March 27, 2016, 8:58pm UTC](https://forums.realmacsoftware.com/t/css-may-not-be-applying-to-my-page/6032/33 "2016-03-27T20:58:52Z")

</div>

Only it was working too well - redirecting almost everything! back to the drawing board

---

<div class="post-metadata">

**Author:** ![thang](https://dub1.discourse-cdn.com/flex005/user_avatar/forums.realmacsoftware.com/thang/32/303_2.png) [@thang](https://forums.realmacsoftware.com/u/thang)\
**Post date:** [March 27, 2016, 8:59pm UTC](https://forums.realmacsoftware.com/t/css-may-not-be-applying-to-my-page/6032/34 "2016-03-27T20:59:52Z")

</div>

No problem - glad it was helpful. I’ve been following the thread and I’ve become a little apprehensive to jump in a give the custom 404 from RW a try. I’ll be interested to know what you come up with. Good Luck!

---

<div class="post-metadata">

**Author:** ![swilliam](https://dub1.discourse-cdn.com/flex005/user_avatar/forums.realmacsoftware.com/swilliam/32/14799_2.png) [@swilliam](https://forums.realmacsoftware.com/u/swilliam)\
**Post date:** [March 27, 2016, 9:30pm UTC](https://forums.realmacsoftware.com/t/css-may-not-be-applying-to-my-page/6032/35 "2016-03-27T21:30:48Z")

</div>

@cynthia, looks like you got it sorted 👍🏻👍🏻

Working for me now.

So how did you fix it?

---

<div class="post-metadata">

**Author:** ![cynthia](https://dub1.discourse-cdn.com/flex005/user_avatar/forums.realmacsoftware.com/cynthia/32/225_2.png) [@cynthia](https://forums.realmacsoftware.com/u/cynthia)\
**Post date:** [March 27, 2016, 9:33pm UTC](https://forums.realmacsoftware.com/t/css-may-not-be-applying-to-my-page/6032/36 "2016-03-27T21:33:25Z")

</div>

I think you fixed it!!! Yes, I believe I’m on an Apache server, and I’m almost afraid to tell you. I think I had it entered wrong when I put in the full URL. When I saw your example, it wasn’t the same as mine. I think I left in a / after ErrorDocument 404 before I entered the full URL. I guess I didn’t know exactly how to enter it correctly. I’m so sorry! I’m hoping that it is working now, not only from the different levels of the site, but rendering correctly from a search engine too. When I tried to check it a few different ways, it seems to me like it’s working now. Thank You, Thank You, so much!! This has been a nightmare for me, just trying to get this working. Thank You all for working so hard on this and for trying to help me so much! I truly appreciate you!!

---

<div class="post-metadata">

**Author:** ![cynthia](https://dub1.discourse-cdn.com/flex005/user_avatar/forums.realmacsoftware.com/cynthia/32/225_2.png) [@cynthia](https://forums.realmacsoftware.com/u/cynthia)\
**Post date:** [March 27, 2016, 9:34pm UTC](https://forums.realmacsoftware.com/t/css-may-not-be-applying-to-my-page/6032/37 "2016-03-27T21:34:46Z")

</div>

I copied your example! I think I had it entered wrong. Thank You!!!

---

<div class="post-metadata">

**Author:** ![swilliam](https://dub1.discourse-cdn.com/flex005/user_avatar/forums.realmacsoftware.com/swilliam/32/14799_2.png) [@swilliam](https://forums.realmacsoftware.com/u/swilliam)\
**Post date:** [March 27, 2016, 9:37pm UTC](https://forums.realmacsoftware.com/t/css-may-not-be-applying-to-my-page/6032/38 "2016-03-27T21:37:19Z")

</div>

Glad it’s sorted, I know how you feel, it took me a while to figure it out when I did mine. 👏🏻👏🏻

---

<div class="post-metadata">

**Author:** ![manofdogz](https://dub1.discourse-cdn.com/flex005/user_avatar/forums.realmacsoftware.com/manofdogz/32/26314_2.png) [@manofdogz](https://forums.realmacsoftware.com/u/manofdogz)\
**Post date:** [March 27, 2016, 10:20pm UTC](https://forums.realmacsoftware.com/t/css-may-not-be-applying-to-my-page/6032/39 "2016-03-27T22:20:42Z")

</div>

AT LAST - works perfectly and sooooo simple! I’m sure we’re all grateful to see a happy end to this thread - google the problem and you’ll see there’s a lot of confusion. Thanks to all for your persistence and @swilliam for the simple solution

If anyone doesn’t want to plough through all of this thread and needs to add a custom 404 that works for top level URL errors and sub-directories - here’s a summary for dummies (like me).

- Create your custom 404 error page just like any other page in RW
- De-select “show in navigation”
- Call the page something relevant - “404” is probably easiest but up to you. I use “notfound”
- Leave it in root folder (/)
- Using FTP, add an .htaccess file at root level on your server or modify if already there. Add the following to it:

ErrorDocument 404 [yourdomain.com/yourcustom404filename.html](http://yourdomain.com/yourcustom404filename.html)

(for example: ErrorDocument 404 [http://mygreatwebsite.com/404.html](http://mygreatwebsite.com/404.html))

If there are problems with this it is possible your hosting service does not allow user-modified .htaccess files. In which case, see if there are error pages you can edit in cPanel insteasd, or ask your hosting service to help - or change hosting service.

And that should be it. However, I’ve been drinking tonight so test it first…and if I’ve summarised incorrectly shoot me down in flames. 🙃

---

<div class="post-metadata">

**Author:** ![swilliam](https://dub1.discourse-cdn.com/flex005/user_avatar/forums.realmacsoftware.com/swilliam/32/14799_2.png) [@swilliam](https://forums.realmacsoftware.com/u/swilliam)\
**Post date:** [March 27, 2016, 10:57pm UTC](https://forums.realmacsoftware.com/t/css-may-not-be-applying-to-my-page/6032/40 "2016-03-27T22:57:13Z")

</div>

Just to clarify, I’m not saying this is the “proper” way to do this, just that it worked for me.

EDIT: THIS DOES NOT WORK PROPERLY SEE THE FOLLOWING

[post here](http://forums.realmacsoftware.com/t/wrong-custom-404-page-displaying/5992/42)

[Previous page](https://forums.realmacsoftware.com/t/css-may-not-be-applying-to-my-page/6032.md?page=1)

[Next page](https://forums.realmacsoftware.com/t/css-may-not-be-applying-to-my-page/6032.md?page=3)
