![]() |
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. |
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 |
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 |
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