Changing a link on hundreds of html pages

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • flashfire
    ICQ 1 6 7 8 5 3 4 9 2
    • Feb 2003
    • 13098

    #1

    Changing a link on hundreds of html pages

    Okay I have to change all the links on tons of html pages from one url to another...is there a fast way or doing this...any scripts or programs?? thanx
  • Mishi
    Confirmed User
    • Feb 2002
    • 1054

    #2
    UltraEdit has a "change in files" option. So do several other proggies...I'm sure someone will be along shortly with a better suggestion...
    Looking for PHP/MySQL solutions? Check out Cyboriginal - custom scripts, installation services and more.

    Comment

    • Brad Xtremepay
      So Fucking Banned
      • Dec 2003
      • 2000

      #3
      Try using include files. SSI or php includes. Whatever you have to work with. Split every page up into sections. Use templates!

      Comment

      • Amputate Your Head
        There can be only one
        • Aug 2001
        • 39075

        #4
        DWMX 04: Find & Replace
        SIG TOO BIG

        Comment

        • flashfire
          ICQ 1 6 7 8 5 3 4 9 2
          • Feb 2003
          • 13098

          #5
          Hey amp with DWMX dont I have to open all the files?? Can you give me some more info?

          Thanx Guys

          Comment

          • Ben-MensNiche
            Confirmed User
            • Dec 2003
            • 726

            #6
            Originally posted by Brad Xtremepay
            Try using include files. SSI or php includes. Whatever you have to work with. Split every page up into sections. Use templates!
            What he said - I use SSI all the time in my own pages, it saves a HEAP of time in administration.

            It also means that you can write a template, that has an SSI banner, sidebar, copyright and then you can use PHP to generate your page content - meaning that you only have administer a very small amount of pages instead of 1000s of them.

            I remember my first website which I started supporting for a company, it was written in straight html, and had 64,000 pages. Can I say PAIN IN THE ASS?! After I changed to ASP, they had 1 database, 1 template and 5 asp files. Way easier to manage. I would definitely recommend this route!

            ICQ: 310539245
            Email: [email protected]

            Comment

            • flashfire
              ICQ 1 6 7 8 5 3 4 9 2
              • Feb 2003
              • 13098

              #7
              Oh, figured it out....THANX EVERYONE!

              Comment

              • Amputate Your Head
                There can be only one
                • Aug 2001
                • 39075

                #8
                Originally posted by flashfire
                Hey amp with DWMX dont I have to open all the files?? Can you give me some more info?

                Thanx Guys
                nope.... just open up one file. Find the string you wanna replace, open up Find & Replace, select Source Code, put in the string to find, and the string to replace it with, and select either, This Doc, Specify a folder, or Entire Site.

                done in seconds.
                SIG TOO BIG

                Comment

                • flashfreak
                  Confirmed User
                  • Jun 2002
                  • 4396

                  #9
                  if you plan to do it on your computer dreamweaver or homesite can do it.
                  here's what I'm using if I want to modify links on a server :

                  find . -type f | xargs perl -pi.bak -e 's/old_string/new_string/g'

                  it works recursivelly on the folders and makes a backup file too (.bak) which you can skip of course if you don't want it.
                  SEO Mogul | ICQ: 163671223

                  Comment

                  • Baal
                    Confirmed User
                    • Jan 2002
                    • 696

                    #10
                    Originally posted by Amputate Your Head


                    nope.... just open up one file. Find the string you wanna replace, open up Find & Replace, select Source Code, put in the string to find, and the string to replace it with, and select either, This Doc, Specify a folder, or Entire Site.

                    done in seconds.
                    Does DWMX do this on remote files as well? Or just local files? Remote would be slow as shit (assuming it would have to use FTP, as opposed to opening a Telnet or SSH session, which I doubt it can do), but even via FTP, remote search & replace might have it's uses in some cases for me.

                    Comment

                    • MadCap
                      Confirmed User
                      • Aug 2002
                      • 2357

                      #11
                      all i got was people trying to sell me shit



                      dw is good but i was lookin for something to do it on the fly

                      Comment

                      • Adulter
                        Confirmed User
                        • Feb 2003
                        • 1252

                        #12
                        Dreamveawer


                        And try to use SSI next time

                        Comment

                        • VeriSexy
                          Join The Royal Family
                          • Apr 2002
                          • 25463

                          #13
                          Search and replace 98 can do it. It's free
                          Looking for a KICK ASS TEEN SPONSOR? Check out ROYAL CASH - THE KING OF TEEN!
                          Incredible webmaster tools FHGs, Morphing Blog and RSS Feeds, Embedded FLV & WMV Videos
                          .
                          With TOP RATIO Sites like


                          ATMovs.com | iTeenVideo.com |
                          TeenSexMovs.com | TeenSexMania.com


                          Comment

                          • leg4
                            Confirmed User
                            • May 2003
                            • 4429

                            #14
                            bk search and replace on the server
                            >>> Contact me here

                            email me here

                            Comment

                            • gin
                              Confirmed User
                              • Sep 2003
                              • 672

                              #15
                              do it right.. so you can change it all anytime you want..
                              make a text file and put the url into it..

                              PHP Code:
                               $filename = ('../url.txt');
                               $info = file($filename);
                               $url= $info[0];
                              
                              
                              <?=$url;?> anywhere needed..
                              might be ghetto but it works

                              Comment

                              • xxxoutsourcing
                                Confirmed User
                                • Oct 2003
                                • 3888

                                #16
                                You can use a stream editor like sed that will do it a breeeeze

                                xxxoutsourcing.com
                                ICQ:119936 | Aim:xxxoutsourcing | MSN:msn@ xxxoutsourcing.com | Yahoo:xxxoutsourcing
                                Submitters, Designers, Programmers, Cartoonist, Creative Writers, Video & Photo Editors
                                Convert your Paysite into a cartoon site convert2toons.com

                                Comment

                                • Baal
                                  Confirmed User
                                  • Jan 2002
                                  • 696

                                  #17
                                  Originally posted by leg4
                                  bk search and replace on the server
                                  Damn, I remember this tool from *years* ago! Do they offer S&R on the various Unix servers?
                                  Gotta love Regular Expressions!

                                  BTW, of course PERL, PHP, Python, shell, even C++ or even C could do it. It's just a matter of what's easiest to do it in.

                                  Comment

                                  • Toni
                                    Confirmed User
                                    • Oct 2001
                                    • 2697

                                    #18
                                    The best program to do that is TextPipe Pro!


                                    $25-$50 Per Signup, 60%-70% Rev Share, 125+ Sites, Exclusive Sites, tons of free content
                                    70,000+ FHG's, Free Domain Hosting, 10,000+ Hosted FLV's - Need Live Cams? Check out ItsLive.com
                                    Fetish Hits paying affiliates since 2001 - Every time on time!

                                    Comment

                                    • flashfreak
                                      Confirmed User
                                      • Jun 2002
                                      • 4396

                                      #19
                                      Originally posted by gin
                                      do it right.. so you can change it all anytime you want..
                                      make a text file and put the url into it..

                                      PHP Code:
                                       $filename = ('../url.txt');
                                       $info = file($filename);
                                       $url= $info[0];
                                      
                                      
                                      <?=$url;?> anywhere needed..
                                      might be ghetto but it works
                                      the only prob is you have to have php files, so you can't do it for galleries.
                                      SEO Mogul | ICQ: 163671223

                                      Comment

                                      • lock
                                        Confirmed User
                                        • Jul 2003
                                        • 5065

                                        #20
                                        Textpad do em all in find replace 1 press
                                        Traffic.Tools - 40+ Free Tools
                                        Free.Marketing - 150+ Free Tools
                                        Submission.Tools
                                        - 20+ Free Tools

                                        Comment

                                        • Krille
                                          Confirmed User
                                          • Mar 2002
                                          • 2436

                                          #21
                                          i use bk replace em for these kind of things, works like a charm, fast and easy

                                          Comment

                                          • kenny
                                            Confirmed User
                                            • Mar 2002
                                            • 7245

                                            #22
                                            Here is the way I do it in server shell:


                                            find directory -name '*.html' -exec perl -pi -e 's/http:\/\/www.oldlink.com/http:\/\/www.newlink.com/g' {} \;
                                            7

                                            Comment

                                            • uptheyingyang
                                              Confirmed User
                                              • May 2003
                                              • 376

                                              #23
                                              multiupdate



                                              http://www.ksware.com/mu.shtml
                                              promote our original content 30 niche site package with ccbill:
                                              www.gashflash.com/affiliates/

                                              Comment

                                              • Dusen
                                                Confirmed User
                                                • Aug 2002
                                                • 2251

                                                #24
                                                Perl can do it. Search google for "perl find and replace"
                                                Penis Pill Sponsor List and Reviews:
                                                http://www.pillsponsors.com

                                                Comment

                                                • DanielS
                                                  Registered User
                                                  • Apr 2003
                                                  • 569

                                                  #25
                                                  Multi Replace, by Martin Holmes.

                                                  Comment

                                                  • WebDork
                                                    Confirmed User
                                                    • Jan 2002
                                                    • 402

                                                    #26
                                                    If you want to do it on your desktop, there are shitloads of programs out there.

                                                    If you want to do it on your server you can do it via PHP or PERL using regex (regular expressions).

                                                    Might cost you $10-$20 for someone to code it if you cant do it yourself.
                                                    Video Ipod Porn Site with Affiliate Program. http://www.podies.com
                                                    Free 1:1 Adult Webmaster Banner Exchange.

                                                    Comment

                                                    • Trax
                                                      [----------------------]
                                                      • Aug 2001
                                                      • 14486

                                                      #27
                                                      best one is BKMReplace or something
                                                      its free

                                                      Comment

                                                      • mikeeee
                                                        Registered User
                                                        • Jun 2003
                                                        • 481

                                                        #28
                                                        format c

                                                        why do you have a hundreds of pages? Use SSI or php includes going forward and you only have to change one file.

                                                        Comment

                                                        • Zappu
                                                          Confirmed User
                                                          • Jul 2002
                                                          • 1556

                                                          #29
                                                          With the best editor around: Homesite it's an easy job
                                                          Zappu (ICQ: 23141467)
                                                          European Erotik Content Archive

                                                          CONTENT4FREE = CONTENT4CLICKS X JOIN NOW!

                                                          Comment

                                                          Working...