![]() |
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
|
UltraEdit has a "change in files" option. So do several other proggies...I'm sure someone will be along shortly with a better suggestion...
|
Try using include files. SSI or php includes. Whatever you have to work with. Split every page up into sections. Use templates!
|
DWMX 04: Find & Replace
|
Hey amp with DWMX dont I have to open all the files?? Can you give me some more info?
Thanx Guys:thumbsup |
Quote:
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! |
Oh, figured it out....THANX EVERYONE!
|
Quote:
done in seconds. |
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. |
Quote:
|
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 |
Dreamveawer :thumbsup
And try to use SSI next time :glugglug |
Search and replace 98 can do it. It's free :thumbsup
|
bk search and replace on the server
|
do it right.. so you can change it all anytime you want..
make a text file and put the url into it.. PHP Code:
|
You can use a stream editor like sed that will do it a breeeeze:winkwink:
|
Quote:
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. |
The best program to do that is TextPipe Pro!
|
Quote:
|
Textpad do em all in find replace 1 press
|
i use bk replace em for these kind of things, works like a charm, fast and easy
|
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' {} \; |
|
Perl can do it. Search google for "perl find and replace"
|
Multi Replace, by Martin Holmes. :)
|
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. |
best one is BKMReplace or something
its free |
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. |
With the best editor around: Homesite it's an easy job
|
All times are GMT -7. The time now is 06:07 PM. |
Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2025, vBulletin Solutions, Inc.
©2000-, AI Media Network Inc123