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 this possible? (https://gfy.com/showthread.php?t=545458)

kenny 11-28-2005 10:27 AM

Is this possible?
 
to change where links go by using .htaccess

basicly I want to change sponsor links without manually going through it thousands of times.

jaa666 11-28-2005 10:32 AM

You can do that by using custom php scripts.

by .htaccess you can control other things that are taking place before the page is being displayed to the surfer

kenny 11-28-2005 10:59 AM

Do you think If I ran this on the command line it would be alright?


find directory -name '*.html' -exec perl -pi -e 's/old_sponsor_url/new_sponsor_url/g' {} \;

I have used it for small amounts of replacing

If I ran this through gigs of files I'm afraid it could crash the server or fuck something up some how

Tom_PM 11-28-2005 11:06 AM

Perl was made to be efficient in such things. Why not call your host and tell a tech you are about to run a scary command, so please stand near the reboot switch. Then go for it. (after you have backed it all up obviously)

You COULD use htaccess if you really really wanted to.
Pass the referring URI as a query string to a custom script, parse it,if not replaced yet, replace, save, serve to browser.

That would be a heavier load on the server in the long run though from the looks of it.


All times are GMT -7. The time now is 03:47 PM.

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