Gamecommunity =GCHQ= http://forum.gamecommunity.co.uk:8080/ | |
apache + website http://forum.gamecommunity.co.uk:8080/viewtopic.php?f=122&t=53559 |
Page 1 of 1 |
Author: | happyslappy [ Mon Apr 13, 2009 12:36 am ] |
Post subject: | apache + website |
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 ? |
Author: | TheMacOne=GCHQ= [ Mon Apr 13, 2009 1:28 pm ] |
Post subject: | Re: apache + website |
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 |
Author: | LeBeourfCurtaine [ Mon Apr 13, 2009 11:05 pm ] |
Post subject: | Re: apache + website |
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? |
Author: | happyslappy [ Tue Apr 14, 2009 10:48 am ] |
Post subject: | Re: apache + website |
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 |
Author: | wowyouareacow=GCHQ= [ Sun Apr 26, 2009 12:50 am ] |
Post subject: | Re: apache + website |
jesus rick. such a noob |
Author: | LeBeourfCurtaine [ Sun Apr 26, 2009 9:13 am ] |
Post subject: | Re: apache + website |
Did you sort it out in the end Rick? |
Author: | GeneralPublic=GCHQ= [ Sun Apr 26, 2009 10:19 am ] |
Post subject: | Re: apache + website |
wowyouareacow=GCHQ= wrote: jesus rick. such a noob hahahahah |
Author: | happyslappy [ Sun Apr 26, 2009 1:34 pm ] |
Post subject: | Re: apache + website |
Quote: Did you sort it out in the end Rick? yeah - perl ftw |
Page 1 of 1 | All times are UTC [ DST ] |
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group http://www.phpbb.com/ |