![]() |
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 |
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 |
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. |
ahhh....yes relative path for the 401...glad to know that cd34 as I'm with you guys :)
|
Cool seems to be working ok guys thanks
|
Quote:
|
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/ |
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. ![]() Otherwise when someone goes to http://yourdomain.com/asdf/asdf/asdf they'll get broken images. |
kk, i think i got that :)
thanks man |
All times are GMT -4. The time now is 03:26 AM. |
Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
© Greenguy Marketing Inc