Rewrite content served by apache
        Posted  
        
            by Andy
        on Stack Overflow
        
        See other posts from Stack Overflow
        
            or by Andy
        
        
        
        Published on 2010-03-23T22:46:45Z
        Indexed on 
            2010/03/24
            16:33 UTC
        
        
        Read the original article
        Hit count: 331
        
Hi guys,
I have an internal app (Jira) that i want to use internally and externally, now there might be another way of doing this in which case i'm open to it, but this is what i have so far:
URL one: https://domainname.com/jira  - external domain name for it
URL two: https://domainname.local/jira - internal network name for it.
I am running Apache as a reverse proxy and I have this:
<Location /jira>
    ProxyPass http://127.0.0.1:8080/jira
    ProxyPassReverse http://127.0.0.1:8080/jira
</Location>
Jira creates all of its links using a base url, which in this case is set to 'https://domainname.local/jira', so obviously when pages get served to the outside world they have .local on them.
The question is, is there a way to have the content rewritten as it is served in order to change the .local addresses within the HTML to be the .com ones?
Or am i being a retard and there is an easier way to solve this?
Cheers for any help....
Andy
© Stack Overflow or respective owner