Welcome to WebmasterWorld Guest from 54.167.5.15

Forum Moderators: incrediBILL

Message Too Old, No Replies

How to change the content of 5000 .html pages?

h e e e e l p :-(((((

     

tatung

6:03 am on Jul 23, 2006 (gmt 0)

5+ Year Member



my site have 5000 URLs (at least).
all pages end with *****.html , they are not php or shtml.
now i have problem because of my 5000 pages.

i run ads in my site, and ad codes are in every single page, now i switching to another ads network, so i need to remove all old codes and insert the new codes in every single page.

so its a hard job to insert the codes in every page, but this is not the problem now, my problem is what i can do now can help me and make my job much easier in the feature if i want to change the codes again.

i will appreciate any help :-)

codemeit

6:35 am on Jul 23, 2006 (gmt 0)

5+ Year Member



If the old code are all the same in different pages.

Just use a tool to find and replace
for all your files.
Since there are 5000 html pages,
I think you may need to replace them use command console.
As far as I know, in Linux, you can use some command with regular expression to do the work pretty quickly.
I suppose it will apply to DOS as well.

Do a search on "regular expression find replace"

That is all I know.
Good luck.

rocknbil

7:46 pm on Jul 23, 2006 (gmt 0)

WebmasterWorld Senior Member rocknbil is a WebmasterWorld Top Contributor of All Time 10+ Year Member



If you search this board for "search and replace" you will find lots of solutions. Mine would be to use Homesite's search and replace method and re-upload the files, OR write a small perl script to do the work for me directly on the site.

Robin_reala

10:59 pm on Jul 23, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



While you're doing find+replaces it might be worth seeing if there are any places you could change to included sections - that'd make things a lot simpler in the future if you have to do this again.

inbound

11:04 pm on Jul 23, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Try WildEdit if you are going to do it on a local PC and upload to your server. It's very handy for such instances (although I've moved away from such techniques).
 

Featured Threads

Hot Threads This Week

Hot Threads This Month