Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Test Version Of New Website Design
 
#26
Okay, I tried to get fancy and set up a custom 404 page. And it don't work.

So I'm trolling for advice.

My host is running Apache. I thought I knew what to do under Apache -- put a file called ".htaccess" in the site root with the contents "ErrorDocument 404 /custom404.shtml", and of course the custom page itself with that name.

But I'm getting a default 404 display instead. What am I doing wrong?
-- Bob
---------
Then the horns kicked in...
...and my shoes began to squeak.
Reply
Missing 404
#27
Quote: My host is running Apache. I thought I knew what to do under Apache -- put a file called ".htaccess" in the site root with the contents
"ErrorDocument 404 /custom404.shtml", and of course the custom page itself with that name.




But I'm getting a default 404 display instead. What am I doing wrong?
Is the custom 404 in a subdirectory, or is it embedded in the root directory of the site? Are you sure the extension

matches the file?
Reply
 
#28
It's in the root directory of the site, and yes, same extension.

Do have to set some kind of permissions on the .htaccess file, maybe?
-- Bob
---------
Then the horns kicked in...
...and my shoes began to squeak.
Reply
 
#29
chmod 644 .htaccess

Some hosting sites do not allow custom 404 pages; make sure your's does.
Reply
 
#30
Except for the chmod tip, I can't offer much more on this one, Bob. My old site ran Apache as well, and I've just double-checked my old .htaccess
file. Same as what you've said, including the .shtml extension.

Um. Only thing I can think of is maybe the case? As in, make sure you don't have "custom404.shtml" in the .htaccess but the file is actually
"Custom404.shtml" or something.

--sofaspud
--"Listening to your kid is the audio equivalent of a Salvador Dali painting, Spud." --OpMegs
Reply
 
#31
Okay, in no particular order: no case issues in the filename (and no stupid typos -- I always doublecheck that).

My only access to the site is through ftp, and if I can make that send a chmod to the host I haven't figured out yet. "Literal"/"!"
don't seem to do it, and shell access just gives me the PC I'm on.

I'll have to talk to support about whether they even allow custom pages. There's nothing on their site that says they forbid them.

Thanks for the help, everyone.
-- Bob
---------
Then the horns kicked in...
...and my shoes began to squeak.
Reply
 
#32
Quote:My only access to the site is through ftp, and if I can make that send a chmod to the host I haven't figured out yet. "Literal"/"!" don't seem to do it, and shell access just gives me the PC I'm on.
Are you sure you don't have telnet or secure shell (ssh) access to the webserver? (It's quite possible that you don't - telnet can be dangerous in the wrong hands, because it allows remote users to run commands on the server.) Either would require a telnet client on your PC - http://www.chiark.greenend.org.uk/~sgtatham/putty/]PuTTY and http://hp.vector.co.jp/authors/VA002416/teraterm.html]Tera Term are both good-quality freeware telnet clients.

If you do, then telnet to the server and run chmod in that session.
--
Rob Kelk
"Governments have no right to question the loyalty of those who oppose
them. Adversaries remain citizens of the same state, common subjects of
the same sovereign, servants of the same law."

- Michael Ignatieff, addressing Stanford University in 2012
Reply
 
#33
I know for a fact that there's no telnet, because I complained about its lack when I jumped to eclipse.net from digex.net. PuTTY, though... I know I used it for something, I just can't remember what because it was years ago. Looks like I'll have to study the Netcarrier website tonight.
-- Bob
---------
Then the horns kicked in...
...and my shoes began to squeak.
Reply
 
#34
eclipse.net redirected to netcarrier.com. netcarrier.com has a page about shared web hosting: http://www.netcarrier.com/services/hosting_shared.asp. On that page it says that Silver and Gold
have telnet access, only Basic does not have it. If you have Silver or Gold I'd talk to them about it.
Reply
 
#35
Far as I know I'm basic. But I'll check on that. Thanks.
-- Bob
---------
Then the horns kicked in...
...and my shoes began to squeak.
Reply
 
#36
Bob,

What ftp program are you using to access the site? With many graphical ftp programs you can select the file on the server and change the attributes. If you
are using a cli ftp program check the command list to see if it is there (Windows ftp does not support chmod.) This site: http://showcase.netins.net/1-800-205-11 ... _chmod.cgi has links on how to do it
using some programs. Filezilla: http://filezilla-project.org/ is another program that supports file attributes.

644 is owner has read and write access, group has read only access and public has read only access if you end up using a gui ftp.
Reply
 
#37
I'm using just the Windows command-line FTP. I'll look into those links now. Thanks!
-- Bob
---------
Then the horns kicked in...
...and my shoes began to squeak.
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)