Affiliate Marketing
Forum Search

Reply
 
LinkBack Thread Tools Display Modes

  #1 (permalink)  
Old 07-10-06
Registered User
 
Join Date: Feb 2006
Location: Redcar (North East)
Posts: 529
Thanks: 30
Thanked 2 Times in 2 Posts
Ditzy is an unknown quantity at this point
  .htaccess confusion

Hi,

I'm trying to add a .htaccess file to my site to redirect visitors to an info page instead of an error 404 page if there are any mishaps.

I've spent quite a bit of time trawling through online tutorials but every time I upload what I've done I end up being unable to access the whole site and I get an error page.

Here's what I've done ...

I'm using Dreamweaver MX2004 and creating a .htaccess file in Notepad then moving it over to Dreamweaver.

I've got an .shtml page saved with the info I want visitors to see.

My .htaccess file says:
ErrorDocument 404 /nameofmypage.shtml
ErrorDocument 503 /nameofmypage.shtml

... which is what all the tutorials are telling me to do.

I've been digging in my book which usually helps me out but can't find any .htaccess info ... would it be listed under another heading?

Getting frustrated now :eek: ... am I missing something glaringly obvious?

The most useful tutorial is telling me that
".htaccess files must be uploaded as ASCII mode not Binary ... you may need to CHMOD the htaccess file to 644 or (64-R--RR)"
What on earth?! I haven't got a Scooby Doo!!

Am I supposed to have any generic headers in my htaccess file ... like you do on every normal .shtml or .html page?

Really would appreciate someone helping me out ... cheers.
__________________
Time may be a great healer but it's a lousy beautician
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 07-10-06
morleymouse's Avatar
Super Member
 
Join Date: Aug 2003
Location: Costa Del Sheffield
Posts: 2,752
Thanks: 3
Thanked 10 Times in 6 Posts
morleymouse is an unknown quantity at this point
in mine I have the full URL so...

ErrorDocument 404 http://www.site.co.uk/file.htm

but yours should work id have thought.

Not sure how dreamweaver uploads the files but on windows I've had trouble having .htaccess files as they just seem to vanish sometimes (dont thin windows like the . at the beginning) so i call mine my.htaccess or something like that on system then rename them once they are on the server.

The CHMOD is just read and write permissions, 644 should be default, and as far as I know most programmes the do FTP upload in ASCII by default, but might be worht looking for some upload settings or transfer settings?

If you use core FTP (nice free ftp programme) there are options at the top to transfer as "auto" "binary" "ascii" so I would imagine most ftp programmes have the option somewhere
__________________
Dan Morley
Alpharooms.com
daniel at alpharooms dot com - Hotels, Flights, Airport Transfers, Care Hire + More! sign up
My Blog | Cheap Holidays
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 07-10-06
Elaine's Avatar
Registered User
 
Join Date: Aug 2003
Location: Redcar Cleveland North of Leeds
Posts: 2,204
Thanks: 15
Thanked 15 Times in 10 Posts
Elaine seems to know their stuff
she could try asking her mother-in-law who has one up and running - but, unfortunately, doesn't have a clue how she did it - and has a sneaking suspicion it just appeared there one morning by magic.
__________________
Elaine - Children's Rooms and Allkids
email: elaine at allkids.co.uk
kev @ childrens-rooms.co.uk
Tel: 01287 644544
Well Behaved Women Rarely Make History
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 07-10-06
morleymouse's Avatar
Super Member
 
Join Date: Aug 2003
Location: Costa Del Sheffield
Posts: 2,752
Thanks: 3
Thanked 10 Times in 6 Posts
morleymouse is an unknown quantity at this point
haha
__________________
Dan Morley
Alpharooms.com
daniel at alpharooms dot com - Hotels, Flights, Airport Transfers, Care Hire + More! sign up
My Blog | Cheap Holidays
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Sponsored Links
  #5 (permalink)  
Old 07-10-06
1BIZLIST's Avatar
In need of a mentor!
 
Join Date: Mar 2006
Posts: 297
Thanks: 0
Thanked 0 Times in 0 Posts
1BIZLIST is an unknown quantity at this point
Hi use textpad to create the .htaccess file as I seem to remember having problems when creating mine in notepad, not sure if that is the problem though, not been creating them for very long myself, although I suspect your problem maybe notepad.

As for headers no not that I am aware of, I simply turn the rewrite engine on with follow simlinks like so

Tested the below code on my server and it works fine, Im using php not .shtml however.

Options +FollowSymLinks
RewriteEngine on
ErrorDocument 404 /nameofmypage.php

Mark.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #6 (permalink)  
Old 08-10-06
Registered User
 
Join Date: Feb 2006
Location: Redcar (North East)
Posts: 529
Thanks: 30
Thanked 2 Times in 2 Posts
Ditzy is an unknown quantity at this point
Hi Dan and Mark,

Thanks for taking the time to reply.

I've decided to be all girlie and wussy and leave this until after I've been in hospital in a couple of weeks ... too much to get my head round at the mo.

Thanks for explaining the CHMOD Dan.

Mark ... I think my next move will have to be to download textpad ... cheers.
__________________
Time may be a great healer but it's a lousy beautician
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
.htaccess File Generation Frostie Widgets, Coding, AJAX, PHP - Technology & Affiliate Marketing 5 18-07-06 01:46 PM
.htaccess construction problem Wardy Widgets, Coding, AJAX, PHP - Technology & Affiliate Marketing 9 05-04-06 04:22 PM
.htaccess "special characters" Wardy Widgets, Coding, AJAX, PHP - Technology & Affiliate Marketing 2 17-01-06 06:36 PM
blocking ip via .htaccess getvisible Widgets, Coding, AJAX, PHP - Technology & Affiliate Marketing 2 21-07-04 05:39 PM
.htaccess, does it really work at all? ninsboak Widgets, Coding, AJAX, PHP - Technology & Affiliate Marketing 4 13-05-03 09:54 AM


Affiliate Marketing RSS Feeds - Contact Us - Affiliate Marketing - Archive - Privacy Statement - Top

Content Relevant URLs by vBSEO 3.2.0 RC7