Greenguy's Board


Go Back   Greenguy's Board > Programming & Scripting
Register FAQ Calendar Today's Posts

Reply
 
Thread Tools Search this Thread Rate Thread Display Modes
Old 2005-10-17, 11:07 PM   #1
mrenaud
If something's hard to do, then it's not worth doing
 
Join Date: Apr 2005
Posts: 240
How do I set up my ht access for redirects?

I haven't got this figured out yet. I want my 404 traffic redirected back to my root.

the way I have things set up right now when I submit a free site for example the url will be adultpornos.net/freesites/bustybabe/index.html

So the surf can just browse my pics and directory without see my ads which obviously is no good. I had it set up so the directories were hidden but I want to redirect that traffic.

help me out please...
thanks
mrenaud is offline   Reply With Quote
Old 2005-10-18, 02:39 AM   #2
MeatPounder
Women might be able to fake orgasms But men can fake whole relationships
 
MeatPounder's Avatar
 
Join Date: Oct 2003
Location: Fort Lauderdale, Fl
Posts: 2,408
you can simply add a line in your .htaccess like this

ErrorDocument 404 http://adultpornos.net/

or to redirect basic errors do all these 400's and 500 as I do

ErrorDocument 400 http://adultpornos.net/
ErrorDocument 401 http://adultpornos.net/
ErrorDocument 403 http://adultpornos.net/
ErrorDocument 404 http://adultpornos.net/
ErrorDocument 500 http://adultpornos.net/

another thing you can do is set this to stop anyone from seeing the files in directories with no default page is to add this
Options -Indexes

the minus sign means simply not to show indexes of the files in the subdirectories
MeatPounder is offline   Reply With Quote
Old 2005-10-18, 02:55 AM   #3
cd34
a.k.a. Sparky
 
cd34's Avatar
 
Join Date: Sep 2004
Location: West Palm Beach, FL, USA
Posts: 2,396
Just a quick note, if you do

ErrorDocument 401 http://site.com/

you'll generate errors in the error log as it must be a 'relative' document url

ErrorDocument 401 /path/to.html

is what you want.
__________________
SnapReplay.com a different way to share photos - iPhone & Android
cd34 is offline   Reply With Quote
Old 2005-10-18, 10:04 AM   #4
MeatPounder
Women might be able to fake orgasms But men can fake whole relationships
 
MeatPounder's Avatar
 
Join Date: Oct 2003
Location: Fort Lauderdale, Fl
Posts: 2,408
ahhh....yes relative path for the 401...glad to know that cd34 as I'm with you guys
MeatPounder is offline   Reply With Quote
Old 2005-10-18, 01:16 PM   #5
mrenaud
If something's hard to do, then it's not worth doing
 
Join Date: Apr 2005
Posts: 240
Cool seems to be working ok guys thanks
mrenaud is offline   Reply With Quote
Old 2005-10-19, 08:42 PM   #6
oast
With $10,000, we'd be millionaires! We could buy all kinds of useful things like ... love!
 
oast's Avatar
 
Join Date: May 2004
Location: UK
Posts: 316
Quote:
Originally Posted by MeatPounder
another thing you can do is set this to stop anyone from seeing the files in directories with no default page is to add this
Options -Indexes

the minus sign means simply not to show indexes of the files in the subdirectories
Or just put an empty index.html file in the folder
__________________
Playboy Webmasters - The name says it all! $35 per signup or 60% revshare.
oast is offline   Reply With Quote
Old 2006-03-07, 06:36 PM   #7
Doug E
Kids are great, Appu. You can teach them to hate the things you hate and they practically raise themselves now-a-days, you know, with the internet and all
 
Doug E's Avatar
 
Join Date: Mar 2005
Location: Canadeh
Posts: 197
Apologies for bumpin an old thread, but would this be right ?

ErrorDocument 400 /main.html/
ErrorDocument 401 /main.html/
ErrorDocument 403 /main.html/
ErrorDocument 404 /main.html/
ErrorDocument 500 /main.html/
__________________
Asian Porn | Sora Aoi | Natt Kesarin
Doug E is offline   Reply With Quote
Old 2006-03-07, 06:44 PM   #8
cd34
a.k.a. Sparky
 
cd34's Avatar
 
Join Date: Sep 2004
Location: West Palm Beach, FL, USA
Posts: 2,396
you probably don't want the trailing slash at the end of those unless you actually have a directory called main.html

Other than that, make sure that any images loaded on main.html either have a base href, or, are linked with the full path, i.e.

<img src="/path/to/image.jpg">

Otherwise when someone goes to

http://yourdomain.com/asdf/asdf/asdf

they'll get broken images.
__________________
SnapReplay.com a different way to share photos - iPhone & Android
cd34 is offline   Reply With Quote
Old 2006-03-08, 07:14 AM   #9
Doug E
Kids are great, Appu. You can teach them to hate the things you hate and they practically raise themselves now-a-days, you know, with the internet and all
 
Doug E's Avatar
 
Join Date: Mar 2005
Location: Canadeh
Posts: 197
kk, i think i got that

thanks man
__________________
Asian Porn | Sora Aoi | Natt Kesarin
Doug E is offline   Reply With Quote
Reply


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 On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 11:35 AM.


Mark Read
Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
© Greenguy Marketing Inc