Welcome to the GoFuckYourself.com - Adult Webmaster Forum forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact us.

Post New Thread Reply

Register GFY Rules Calendar
Go Back   GoFuckYourself.com - Adult Webmaster Forum > >
Discuss what's fucking going on, and which programs are best and worst. One-time "program" announcements from "established" webmasters are allowed.

 
Thread Tools
Old 06-15-2005, 05:03 PM   #1
Ray@TastyDollars
 
Ray@TastyDollars's Avatar
 
Join Date: May 2002
Location: Montreal
Posts: 6,797
404 .htaccess question

Can you have different 404 .htaccess files in different folders of the same domain? Or will that send the server into a loop?

Ray
Ray@TastyDollars is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 06-15-2005, 05:06 PM   #2
adultseo
Confirmed User
 
Join Date: Jun 2005
Location: The Netherlands
Posts: 365
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^/*.*$ http://www.yourdomain.com/404.php?file=%{REQUEST_FILENAME}$1 \
[T=application/x-httpd-php,L]

it enables you to create dynamic 404 pages

Best Regards,
Adult SEO
__________________
The key to get ranked one in Google is to provide the best.
adultseo is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 06-15-2005, 05:08 PM   #3
Ray@TastyDollars
 
Ray@TastyDollars's Avatar
 
Join Date: May 2002
Location: Montreal
Posts: 6,797
Quote:
Originally Posted by adultseo
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^/*.*$ http://www.yourdomain.com/404.php?file=%{REQUEST_FILENAME}$1 \
[T=application/x-httpd-php,L]

it enables you to create dynamic 404 pages

Best Regards,
Adult SEO
I'll have to show my "guy" this tomorrow. I have no idea what to do with that..hehe.

Ray
Ray@TastyDollars is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 06-15-2005, 05:10 PM   #4
swedguy
Confirmed User
 
Industry Role:
Join Date: Jan 2002
Posts: 7,981
ErrorDocument 404 /another404.html

Just add it to a .htaccess and stick it in the folder you want a different 404 on.

Last edited by swedguy; 06-15-2005 at 05:12 PM..
swedguy is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 06-15-2005, 05:12 PM   #5
Ray@TastyDollars
 
Ray@TastyDollars's Avatar
 
Join Date: May 2002
Location: Montreal
Posts: 6,797
Quote:
Originally Posted by swedguy
Just stick a different .htaccess in the folder you want a different 404 on.
Thats what I was asking. So that IS doable? I thought it would send the server into a never ending loop of death.

Ray
Ray@TastyDollars is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 06-15-2005, 05:13 PM   #6
swedguy
Confirmed User
 
Industry Role:
Join Date: Jan 2002
Posts: 7,981
Quote:
Originally Posted by Ray
Thats what I was asking. So that IS doable? I thought it would send the server into a never ending loop of death.

Ray
I do it, so it is doable.
swedguy is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 06-15-2005, 05:15 PM   #7
Ray@TastyDollars
 
Ray@TastyDollars's Avatar
 
Join Date: May 2002
Location: Montreal
Posts: 6,797
Quote:
Originally Posted by swedguy
I do it, so it is doable.
thx! testing it now
Ray@TastyDollars is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 06-15-2005, 05:27 PM   #8
fireorange
Confirmed User
 
Join Date: Jan 2005
Posts: 1,648
Quote:
Originally Posted by adultseo
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^/*.*$ http://www.yourdomain.com/404.php?file=%{REQUEST_FILENAME}$1 \
[T=application/x-httpd-php,L]

it enables you to create dynamic 404 pages

Best Regards,
Adult SEO
Aaah sweeet, thanks hoe
fireorange is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 06-15-2005, 05:31 PM   #9
Ray@TastyDollars
 
Ray@TastyDollars's Avatar
 
Join Date: May 2002
Location: Montreal
Posts: 6,797
Quote:
Originally Posted by swedguy
I do it, so it is doable.
Cool, thx man! Just wanted to make sure it was cool do do before I tried it. Just did a couple of tests and It works fine.

Ray
Ray@TastyDollars is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 06-15-2005, 05:34 PM   #10
BigRod
Confirmed User
 
BigRod's Avatar
 
Join Date: Apr 2005
Location: Vancouver, BC
Posts: 3,685
Nice info guys !
__________________
Rod Macdonald
Mainstream Ad Agency Owner
ICQ: 607306
BigRod is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 06-15-2005, 05:50 PM   #11
prime
Confirmed User
 
Join Date: Feb 2005
Location: Manila
Posts: 400
too much .htaccess on a domain slows down a server. creating dynamic 404 pages here is worth a try
__________________

| offshore solutions | manual labor | staff leasing | and more!
Dedicated -Motivated-Managed Employees
icq.: 309570461 live chat
prime is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 06-15-2005, 06:28 PM   #12
Robx
Confirmed User
 
Join Date: Nov 2004
Location: The middle of nowhere
Posts: 357
Ray, hopefully this will help out a bit on top of the answer you've already received.

Apache (the web serving program) reads the httpd.conf file. The httpd.conf file holds all of the settings that the program needs to run.

Each .htaccess file builds on the httpd.conf file. Each .htaccess file is in the same format and can even have the same options as found in the httpd.conf file. A good way to think of .htaccess files is that they build on the .htaccess file.

As mentioned above, think if you had a whole bunch of .htaccess files in different directories. That would take a long time and a lot of work for Apache to phrase and remember. It's not a big deal on small sites.

However, on large sites, it's definatly not a good idea. First, it does slow the whole server down. Also, it becomes a sysadmin nightmare if you need to make a change to more then a couple .htaccess files. The best solution really depends on what you're doing with all the .htaccess files. Maybe Mod_Rewrite is the best solution, or maybe it's just a matter of optimizing your httpd.conf file.

Fell free to drop me an ICQ or give me a call in the office.
__________________

Contact Us About Getting Your Paysites Exposed To Millions Of People On The Peer To Peer Networks!
ICQ 124-249-781
Robx is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 06-15-2005, 06:55 PM   #13
pornpf69
Too lazy to set a custom title
 
pornpf69's Avatar
 
Join Date: Jun 2004
Location: Brasil
Posts: 15,778
some very helpful info on this thread....
pornpf69 is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Post New Thread Reply
Go Back   GoFuckYourself.com - Adult Webmaster Forum > >

Bookmarks



Advertising inquiries - marketing at gfy dot com

Contact Admin - Advertise - GFY Rules - Top

©2000-, AI Media Network Inc



Powered by vBulletin
Copyright © 2000- Jelsoft Enterprises Limited.