homepage Welcome to WebmasterWorld Guest from 107.20.91.81
register, free tools, login, search, subscribe, help, library, announcements, recent posts, open posts,
Pubcon Platinum Sponsor 2014
Home / Forums Index / Code, Content, and Presentation / WYSIWYG and Text Code Editors
Forum Library, Charter, Moderator: open

WYSIWYG and Text Code Editors Forum

    
.htaccess and custom error pages
Need help in designing one with MS front page
FreeSpirit




msg:936435
 9:31 pm on Jul 7, 2002 (gmt 0)

Hi! I have a question that I hope some of you can help me with.

First of all, I'm pretty much a new learner of web design and I have been learning through Front Page 2002 of how to create sites even if I know that Front Page creates a lot of excess code that slows down the page.

But I have this site created through Front Page and I have read about how putting some custom coding into your htaccess file, you can create a custom error page for any 404 errors or broken links. I understand the kind of coding to use and how to do it. The only problem is, I know that working with an htaccess file can mess up Front Page's settings.

Does anyone know of a way to work around this? I'm even willing to pay a programmer to do this for me.

Thank you.

Jordanne

 

Nick_W




msg:936436
 9:36 pm on Jul 7, 2002 (gmt 0)

As far as I'm aware creating a .htaccess in notepad or similar and just placing it in your root http directory should cause no problem...

Here's the .htaccess code:


ErrorDocument 404 /path/to/page.html

Oh, and welcome to WebMasterWorld!

Nick

ScottM




msg:936437
 9:43 pm on Jul 7, 2002 (gmt 0)

Yes, Welcome FreeSpirit!

It's nice to know FP is being used by new people. I myself am still learning all the in-and-outs of FP.

Some love it, some hate it. I 'like it'. And I appreciate the help that people give concerning FP.

Axacta




msg:936438
 9:56 pm on Jul 7, 2002 (gmt 0)

Nick,

How do you get it into your root. Doesn't it have to be ftp'ed in? And if you use FrontPage, ftp doesn't work.

Marcia




msg:936439
 10:14 pm on Jul 7, 2002 (gmt 0)

I work on a site with FP extensions installed, which I've never done before and I can FTP in.

There is something with .htaccess that's different with FP, though. I put something every-day normal and simple in for SSI and it brought the whole site down for 12 hours. Personally, I'll never go near htaccess with a FP site again.

When that site's ever moved again (which it definitely needs to be) I'll ask that the FP extensions not be installed and certain features of FP not be used because I have to make individual modifications on individual pages to take stuff out for seo purposes. It's saving time on one end, but ending up taking more of my time so it actually isn't an economy of time in the long run.

Axacta




msg:936440
 10:25 pm on Jul 7, 2002 (gmt 0)

>I work on a site with FP extensions installed, which I've never done before and I can FTP in.<

Hmmm. I thought I'd read that there is a compatability problem between FrontPage and FTP. But I certainly won't pretend to know anything about this. If you say it works I believe you. But now I'd like to know more about htaccess/FP compatability. Anyone else have experience with this?

Axacta




msg:936441
 10:29 pm on Jul 7, 2002 (gmt 0)

Oh, now I remember something. I read that htaccess is not compatable with a Microsoft server, but if the FrontPage extensions are on an Apache server htaccess is compatable. Is this right, or am I dreaming this stuff?

FreeSpirit




msg:936442
 4:53 pm on Jul 8, 2002 (gmt 0)

Thanks to all of you who welcomed me so warmly! :) Wow, you guys are all so nice.

And yep, I've been working on Front Page since 2000 (at age 16) and have become better at it over the years.

Nick - Really? Do you think I can go ahead and do it and experience no problem with conflictions between Front Page and .htaccess?

I've read about so many problems that could happen and some people made it sound like there is no way around it. Although, I've also read somewhere that there is a CGI/Perl script that could do the same trick, but I'm not talented enough to create one and I cannot find one.

Oh and for those who aren't sure about FTP and Front Page, I do it all the time on my website hosted at OneWorldHosting.com

Nick_W




msg:936443
 4:56 pm on Jul 8, 2002 (gmt 0)

Nick - Really? Do you think I can go ahead and do it and experience no problem with conflictions between Front Page and .htaccess?

I'm afraid I have no idea, I don't use software of any sort so certainly have FP experience.

Common sense dictates that should the .htaccess much things up though you could just remove it....

Nick

Reflect




msg:936444
 6:19 pm on Jul 9, 2002 (gmt 0)

compatability problem between FrontPage and FTP

The problem comes into play with the publish command. If you FTP the file in FP the publish feature does not realize the page has allready gone out. For this just right click the file and go to properties. Then check the box for do not upload (terms are different as I do not have FP in front of me). Also if utilizing FP includes it will not update the source page with the new include. This is controlled through the private directories that you see like _vti, etc.. I normally FTP in external script files and anything that goes under the CGI-BIN directory.

I alwyas, when unsure, backup any file first, just CYA.

Brian

Axacta




msg:936445
 6:31 pm on Jul 9, 2002 (gmt 0)

I see - thanks Reflect.

rogerd




msg:936446
 6:58 pm on Jul 9, 2002 (gmt 0)

Publishing a FP website and FTP can coexist rather uneasily if you don't FTP any files that are part of the publishable FP site. As soon as you start playing with files that FP knows about, it gets completely confused.

My experience with FP is that sites become corrupted and must be "republished" back to the user's machine. Most FP users whose computers I have seen have directories named "mysite", "mysite2", "mysite3", etc., reflecting different corruption events where the only solution was to open the remote site and republish back to the local HD.

FP has limitations (and a few strengths) as a WYSIWIG editor, but the publishing concept is truly awful.

rroberts




msg:936447
 5:05 am on Jul 10, 2002 (gmt 0)

Hi Jordanne:
Windows doesn't like .htaccess because of the "dot" in front. You must name the local file something like htaccess.txt. After you upload it, you then rename it using the dot. The file may suddenly seem to disappear, but it's there. In order to see the file on the server, you issue an ftp command: ls -a, which will show all files including hidden ones.

You may want to get one of the many free ftp clients so that you can manage some of this without going through FP publish. Sorry I can't help you with FP - I don't use it.
cheers

idiotgirl




msg:936448
 5:27 am on Jul 10, 2002 (gmt 0)

There's a couple more things about vanilla .htaccess and FP .htaccess that I picked up along the way by FTP'ing into Apache servers with FP installed.

The actual htaccess file for a FP site has a little more gobbledy-gook in it than a straight Apache .htaccess file. You must be sure you can see and save the original, untainted version (that works!) and keep it as your backup copy in its own folder - for "just in case".

I found out, in one server setup, that if you add "deny from" IP addresses, that you must comment out
#allow from all
beneath your deny from lines - or else they won't be denied! Weird quirk, huh? Also, the "deny from" IP's could only go on one line, not like:
deny from 00.00.000.0
deny from 01.11.111.1

on multiple lines. Nossir, it had to be:
deny from 00.00.000.0 01.11.111.1
Took me forever to get that figured out - because other servers accepted the other way.

Also, if you do a raw .htaccess in a text editor, be sure you include the plain jane FP stuff like:
# -FrontPage-
IndexIgnore .htaccess */.??* *~ *# */HEADER* */README* */_vti*
<Limit GET POST>
order deny,allow
deny from all
allow from all #you may need to comment this out?
</Limit>
<Limit PUT DELETE>
order deny,allow
deny from all
</Limit>
AuthName www.yourdomain.com yourdomain.com
AuthUserFile /www/htdocs/domain/_vti_pvt/service.pwd
AuthGroupFile /www/htdocs/domain/_vti_pvt/service.grp

ErrorDocument 401 /errorpages/error401.html
ErrorDocument 403 /errorpages/error403.html
ErrorDocument 404 /errorpages/error404.html
ErrorDocument 500 /errorpages/error500.html

That's the gist of it. From that template (or whatever the default template installed was in your case) you can go ahead and embellish the heck out it.

Big_Balou




msg:936449
 9:48 am on Jul 10, 2002 (gmt 0)

Thanks Idiotgirl.

I was having the same problem and was getting ready to chuck it all out the window......couldn't figure out how to integrate the frontpage stuff and the additions :).

Axacta




msg:936450
 12:21 pm on Jul 10, 2002 (gmt 0)

Hey! This stuff is making more sense all the time. Maybe I'll get up enough nerve to try it soon.

idiotgirl




msg:936451
 12:24 pm on Jul 10, 2002 (gmt 0)

As long as you have a good FTP connnection - figure the worst that'll happen is you crash your site ten or twenty seconds while you re-upload your "safe" file and figure out what you did to blow your mod'd .htaccess up. In the big scheme of things it isn't that bad :)

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Code, Content, and Presentation / WYSIWYG and Text Code Editors
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved