Forum Moderators: phranque

Message Too Old, No Replies

Edit html - Noob here

Getting apache to automatically edit the html of served pages

         

splatcat

5:09 pm on Feb 12, 2011 (gmt 0)

10+ Year Member



Hi and thank you in advance for any help you can give me.

I am new to apache and am trying to get my server to do what i want will little luck.

I am running windows server and the latest version of apache and I what I want to do is have apache look at the html being served for all pages and do a simple txt find and replace on specific strings.

I think there are things out there which do what I want but after some reading I still don;t fully understand them or know if getting apache to do what I want is going to work.

Thanks
Stuart

wilderness

6:45 pm on Feb 12, 2011 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



simple txt find and replace on specific strings


Perhaps I've misunderstood?

For what reason would you do this online and within your server?

There are a multitude of "html editors" that will do what you desire and all work offline.

splatcat

8:54 pm on Feb 12, 2011 (gmt 0)

10+ Year Member



The edits to the html have to take place after the SSI have been processed and the final html has been generated. I have been looking at mod_perl, and making some sort of filtering script.

Is this the right direction, I maybe out of my depth here [I have never programmed in perl before :P ]

wilderness

9:45 pm on Feb 12, 2011 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



After the final html has been processed, download the files to your local machine, run the html editor, then re-upload the new files.

Don't you keep backup copies of your website (s) locally?
If not?
That's something that needs immediate resolution.

I've no clue about perl.

splatcat

2:00 am on Feb 13, 2011 (gmt 0)

10+ Year Member



Thanks for your responses but you are clearly misunderstanding what I am trying to do.

I am using mod_proxy on the server and redirecting a local web resource to a remote system. I need the served files to be edited on the fly, almost like web filtering.

the website which needs to be edited is being created on the fly by a closed source application and is impossible to edit.

I may be looking for help in the wrong forum.

I may be a noob but
"Don't you keep backup copies of your website (s) locally?"
I am not that bad :P I think this is a non trivial problem

jdMorgan

9:25 pm on Feb 17, 2011 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Look into Apache 2.x output filters, as they seem to be what you're looking for.

If the 'errors' you are trying to edit have to do with back-end redirects, look at the mod_proxy settings; Since you haven't said specifically *why* you need to edit the output, I can only assume that something is "wrong" in the HTML output by the script, and provide a few general hints here...

Jim