GoFuckYourself.com - Adult Webmaster Forum

GoFuckYourself.com - Adult Webmaster Forum (https://gfy.com/index.php)
-   Fucking Around & Business Discussion (https://gfy.com/forumdisplay.php?f=26)
-   -   404 .htaccess question (https://gfy.com/showthread.php?t=481292)

Ray@TastyDollars 06-15-2005 05:03 PM

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

adultseo 06-15-2005 05:06 PM

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

Ray@TastyDollars 06-15-2005 05:08 PM

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

swedguy 06-15-2005 05:10 PM

ErrorDocument 404 /another404.html

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

Ray@TastyDollars 06-15-2005 05:12 PM

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

swedguy 06-15-2005 05:13 PM

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.

Ray@TastyDollars 06-15-2005 05:15 PM

Quote:

Originally Posted by swedguy
I do it, so it is doable.

thx! testing it now

fireorange 06-15-2005 05:27 PM

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 :thumbsup

Ray@TastyDollars 06-15-2005 05:31 PM

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

BigRod 06-15-2005 05:34 PM

Nice info guys !

prime 06-15-2005 05:50 PM

too much .htaccess on a domain slows down a server. creating dynamic 404 pages here is worth a try :)

Robx 06-15-2005 06:28 PM

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.

pornpf69 06-15-2005 06:55 PM

some very helpful info on this thread....


All times are GMT -7. The time now is 08:22 PM.

Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2025, vBulletin Solutions, Inc.
©2000-, AI Media Network Inc123