Home apache rewrite a absolute path to an relative path
Reply: 0

apache rewrite a absolute path to an relative path

user892
1#
user892 Published in August 15, 2018, 11:15 am

I'm trying to rewrite a absolute path to an relative path. But I'm confused. We are using a ProxyPath to another Server to include an Webapp into our URL Structure.

The webapp should run under www.mydomain.com/webapp/ Now I do have sourcecode like this within the Webapp

<script src="/js/bower_components/inputs/dist/js/inputs-min.js?v=3.5.27"></script>

I want to rewrite /js/ to js/ because /js would go to the root of the webserver. The correct path should be /webapp/js/bower_components...

My rewrite code

RewriteCond %{REQUEST_URI} ^/webapp/
RewriteRule ^/js/(.*) /webapp/js/$1 [L,R=301,NC]

does not work. Do you have any ideas what's wrong?

We can't change the sourcode of the webapp and can't upload a htaccess to the webapp server.

Thx!

You need to login account before you can post.

About| Privacy statement| Terms of Service| Advertising| Contact us| Help| Sitemap|
Processed in 0.303248 second(s) , Gzip On .

© 2016 Powered by mzan.com design MATCHINFO