Is this possible?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • kenny
    Confirmed User
    • Mar 2002
    • 7245

    #1

    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.
    7
  • jaa666
    Registered User
    • Nov 2005
    • 38

    #2
    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
    I buy mainstream traffic - UK, France, Italy, Spain, Ireland, Japan and China. We can arrange nice deals on chinese traffic that is useless for your website. Get your advantage now! Contact me - jaa666 at gmail dot com !

    Comment

    • kenny
      Confirmed User
      • Mar 2002
      • 7245

      #3
      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
      7

      Comment

      • Tom_PM
        Porn Meister
        • Feb 2005
        • 16443

        #4
        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.
        43-922-863 Shut up and play your guitar.

        Comment

        Working...