Author |
Message |
happyslappy
|
Post subject: apache + website Posted: Mon Apr 13, 2009 12:36 am |
|
|
that was a stupid comment btw |
|
Joined: Wed Mar 03, 2004 12:40 pm Posts: 109345 Location: manchester
|
i have 4500 + webpages i need to change there all static. i need to add 2 small peaces of php code 3000 pages the header is the same so i could make a small script the footer line injection is diff on every page as a line count but the injecton code is always the same rather than get all complex with a loop script - injction points alwaty the same ie - header is </div></div></div></div><div id="top_nav">
id like to have a easy way to make apache render the code as </div></div></div></div><?php slappy.php?><div id="top_nav">
ony every page off that virtual host- now how do i do itmod proxy / layout / php sed ? or load it all in sql and inset on the select ? any ideas welcome as i recon a pure sed scrip on whole site - 4500 + pages = lots of room for error - any ideas ?
_________________
|
|
|
|
|
TheMacOne=GCHQ=
|
Post subject: Re: apache + website Posted: Mon Apr 13, 2009 1:28 pm |
|
|
Bow down to the master |
|
Joined: Mon Oct 01, 2007 6:38 pm Posts: 2499 Location: Between .local and dev:null :D
|
Maybe by hand? Can't you tell the script to look for a plan a, b or c in the loop? For example, if a page doesn't have "plan a" in the footer, then search for "plan b". If not, search for "plan c", etc.... When I mean "plan a", a known piece of code in most of the pages. Unless you would end up with a million DIFFERENT cases
|
|
|
|
|
LeBeourfCurtaine
|
Post subject: Re: apache + website Posted: Mon Apr 13, 2009 11:05 pm |
|
|
Decidedly uninterested |
|
Joined: Thu Mar 18, 2004 11:10 pm Posts: 10184 Location: I watch you while you sleep
|
Try writing a simple script that finds the first instance of '</div></div></div></div><div id="top_nav">' on a page and then replaces it? You could run it as a find first that outputs the amended text to a log file for checking before you commit, I suppose?
_________________ The Pancreas of S.T.F.U. | Never take life too seriously - nobody gets out alive anyway. Disco_jim: um..... I have no excuse. | Chips: Thank the Beef | Rev Dr: Beef, I think i wee'd a little
|
|
|
|
|
happyslappy
|
Post subject: Re: apache + website Posted: Tue Apr 14, 2009 10:48 am |
|
|
that was a stupid comment btw |
|
Joined: Wed Mar 03, 2004 12:40 pm Posts: 109345 Location: manchester
|
well sed does what i want and iv got it working but im having trouble with it interpreting spaces and some eliments of html code ie > atm so progress has been made id rather just have a small apache module tbh
_________________
|
|
|
|
|
wowyouareacow=GCHQ=
|
Post subject: Re: apache + website Posted: Sun Apr 26, 2009 12:50 am |
|
|
a norweigen silly curtain loving bitch |
|
Joined: Thu Mar 04, 2004 1:35 pm Posts: 4977 Location: Kath
|
|
|
|
|
LeBeourfCurtaine
|
Post subject: Re: apache + website Posted: Sun Apr 26, 2009 9:13 am |
|
|
Decidedly uninterested |
|
Joined: Thu Mar 18, 2004 11:10 pm Posts: 10184 Location: I watch you while you sleep
|
Did you sort it out in the end Rick?
_________________ The Pancreas of S.T.F.U. | Never take life too seriously - nobody gets out alive anyway. Disco_jim: um..... I have no excuse. | Chips: Thank the Beef | Rev Dr: Beef, I think i wee'd a little
|
|
|
|
|
GeneralPublic=GCHQ=
|
Post subject: Re: apache + website Posted: Sun Apr 26, 2009 10:19 am |
|
|
Saints ftw!! |
|
Joined: Fri Apr 23, 2004 6:22 pm Posts: 7877 Location: /dev/null
|
wowyouareacow=GCHQ= wrote: jesus rick. such a noob hahahahah
_________________ Insert unfunny comment here ->
|
|
|
|
|
happyslappy
|
Post subject: Re: apache + website Posted: Sun Apr 26, 2009 1:34 pm |
|
|
that was a stupid comment btw |
|
Joined: Wed Mar 03, 2004 12:40 pm Posts: 109345 Location: manchester
|
Quote: Did you sort it out in the end Rick? yeah - perl ftw
_________________
|
|
|
|
|
|