Hexagora Forum
Hexagora Forum
Home | Profile | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 Dynamic HTML Editor
 Dynamic HTML Editor
 Page not rendering when using .htaccess
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

rmmarsh
Super User

USA
396 Posts

Posted - 06 Dec 2011 :  00:15:47  Show Profile  Visit rmmarsh's Homepage  Reply with Quote
I have modified .htaccess to refer 404 errors to another page. You can see what is rendered by going here (http://www.pragersoftware.com/downloads/PragerInventoryUpdate-11.5.5.exe). If you go to the home page (pragersoftware.com), you will see what it's supposed to look like.

The modification to .htaccess is:
ErrorDocument 404 /error404Handler.htm


How do I fix this?

joneq
Super User

433 Posts

Posted - 06 Dec 2011 :  07:05:42  Show Profile  Visit joneq's Homepage  Reply with Quote
Not an expert in .htaccess but assuming the file path is from the root like it should be it might be the H in handler try to rename it with lower case or see below. Yours seems to find the file, just not all of it-and no images--I do not know if the problems with upper case have to do with that--or if it is a dhe problem--

view source and click on any image and nothing happens--do you need to use absolute paths with the errorHandler.htm file.
--------------------
Upper and lower case in htaccess

An htaccess file does recognise case, ie capital letters. This because the server does. In general it is always best to use lower case whenever possible for anything related to websites or web use. For example URLs should not use upper case letters since that will sometimes cause problems. In order to handle URLs and commands that may include upper case letters, the suffix [NC] is added to the end of a line of script, meaning 'no case' or ignore upper / lower case. It can also be written [nc], but is clearer in UC.
===============================
Here is a video on htaccess where the guy puts all the specially created error pages ,named for their errror, in a folder in the root and sets the path from there.

http://www.screenr.com/M34

there are a lot of informative htaccess videos on numerous uses of it at the bottom of this page the text is shown so may be of use on another project

http://codecanyon.net/item/htaccess-builder/128943

good luck

If none of that makes sense you will know how tired I am

Edited by - joneq on 06 Dec 2011 07:26:36
Go to Top of Page

rmmarsh
Super User

USA
396 Posts

Posted - 06 Dec 2011 :  16:20:10  Show Profile  Visit rmmarsh's Homepage  Reply with Quote
I don't think it's .htaccess... none of the images are showing, and the page is in the same directory as all of the other pages for that site.

R
Go to Top of Page

joneq
Super User

433 Posts

Posted - 06 Dec 2011 :  16:47:31  Show Profile  Visit joneq's Homepage  Reply with Quote
well, one does show up, and it has absolute path not located on your server

http://translate.googleapis.com/translate_static/img/mini_google.png

talk to your host and see if they have any ideas

Edited by - joneq on 06 Dec 2011 16:49:56
Go to Top of Page

rmmarsh
Super User

USA
396 Posts

Posted - 06 Dec 2011 :  22:54:13  Show Profile  Visit rmmarsh's Homepage  Reply with Quote
I put a cry for help on Experts-Exchange and the response was:

In your error404Handler.htm you need to check the paths to the images can be located relative to the root directory of your website.

e.g. if you have C:\Somewhere\doc.png for your path in your html file the webserver is not going to find it.

If from your error404Handler.htm directory your image directory is ../images then the path should be ../images/doc.png

The other issue could be that there is no access to the images directory depending on what it is. You can check this by looking in the error log for the apache server.


That said, how do I force the path of the images to be what he says I need? (../images/doc.png) All of the images are in either the navagation.dhe or masterpage.dhe page.

Edited by - rmmarsh on 06 Dec 2011 22:59:20
Go to Top of Page

joneq
Super User

433 Posts

Posted - 07 Dec 2011 :  01:09:14  Show Profile  Visit joneq's Homepage  Reply with Quote
Sounds like something David may have to figure out--for the time being I would make the error page in a regular editor like kompozer using absolute paths for everything, put it in the root,name it error404handler.htm [no need for caps] add the .htaccess/ ErrorDocument 404 /error404handler.htm and have a link to http://pragersoftware.com/index.htm on the error page.Till it get fixed anyway--

get some good ideas here.

http://tinyurl.com/6rtpnld

Edited by - joneq on 07 Dec 2011 03:44:03
Go to Top of Page

s.dav
Site Admin

Italy
3364 Posts

Posted - 07 Dec 2011 :  09:04:00  Show Profile  Visit s.dav's Homepage  Reply with Quote
I read the topic and I saw that some images are not correctly linked to the page.

As for other files in the same folder, D.H.E. has linked images relatively (ex. src="files/error404handler_grlabel1.png") but as your referred file was in the "download" folder, the browser searches for a path like:

http://www.pragersoftware.com/downloads/files/error404handler_grlabel1.png

that is wrong as it should be "http://www.pragersoftware.com/files/error404handler_grlabel1.png".

This because the web server referred to the error page using an HTTP Transfer and not an HTTP Redirect, so your error page is referred as it is in the download folder but it doesn't.

Fortunately, this problem can be resolved quickly, because I had to solve the same problem in the past :-)

In the Page Properties panel search for a property called "custom references path"; if filled D.H.E. will prefix every relative path with the content in this field.

So for the error page write "http://www.pragersoftware.com" (maybe you need also to put the "/" but I can't remember)

It will solve the problem ;-)

Regards, Davide
Go to Top of Page

rmmarsh
Super User

USA
396 Posts

Posted - 07 Dec 2011 :  15:13:01  Show Profile  Visit rmmarsh's Homepage  Reply with Quote
Fantastic! works like a champ!
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
Hexagora Forum © s.dav Go To Top Of Page
Snitz Forums 2000