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)
-   -   Is using PHP faster than htaccess? (https://gfy.com/showthread.php?t=481295)

fireorange 06-15-2005 05:07 PM

Is using PHP faster than htaccess?
 
Say I wanted to 301 redirect traffic to different page depending on HTTP referer, will using PHP be better?

Under high traffic (200k uniques per day).

riddler 06-15-2005 05:08 PM

you wouldnt think so since .htaccess is a coded part of apache and other web servers, i never have tried, give it a try and see how it works out.

woj 06-15-2005 05:09 PM

.htaccess should be faster...

psili 06-15-2005 05:11 PM

If possible, modify your apache VirtualHost which would be the fastest since it's not checked on each page request. However, I'm not 100% certain that the .htaccess file is.

So don't read this post, because I dunno what I'm saying.

Sorry. :(

kernelpanic 06-15-2005 05:16 PM

htaccess is much faster than php, at the (small) expense of having to run mod_rewrite

chupachups 06-15-2005 05:19 PM

Php doesnt stand a chance

Tempest 06-15-2005 05:36 PM

If you can (dedicated server for example), put anything "permanent" into your web server config file and not the htaccess file... the htaccess file has to be loaded for each request... That will be the absolute fastest.

prime 06-15-2005 05:42 PM

put the config line in httpd.conf first - this is faster because the settings are loaded into memory after apache was started. unlike .htaccess which are loaded everytime the page is access.

php vs htaccess = i think php, but not 100% sure

fireorange 06-15-2005 05:46 PM

Quote:

Originally Posted by prime
put the config line in httpd.conf first - this is faster because the settings are loaded into memory after apache was started. unlike .htaccess which are loaded everytime the page is access.

Aaah yes! I've read about that before but forgotten about it, thanks :thumbsup

pornpf69 06-15-2005 07:05 PM

I have absolute no clue about it....but it would be interesting to find out...

Terenzo 06-15-2005 07:16 PM

can i have an image directory protected from the httpd.conf instead with an .htaccess file when the .htaccess file in the domain.com/images/ directory looks like:

RewriteEngine On
RewriteCond %{HTTP_REFERER} !^http://(www\.)?domain\.com/ [NC
RewriteCond %{HTTP_REFERER} !^$
RewriteRule \.(jpe?g|gif|bmp|png)$ http://www.domain.com/ [L]



and what would that code be?
many thanx.

fris 06-15-2005 09:13 PM

there is a lot you can do with mod_rewrite.


you can go really deep into it.

there are some really good docs on it


All times are GMT -7. The time now is 06:56 AM.

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