Forum Moderators: phranque
[edited by: Ocean10000 at 1:31 am (utc) on Jan 24, 2014]
[edit reason] Examplified [/edit]
Very stupid URL rewriting question
Apache redirecting/proxying/aliasing (whatever)requests from http://example.com/abc/ to http://example.com/xyz/
but never-ever showing "/xyz" in the browser. This last part, hiding the "/xyz" seems to be tough ...
ProxyPass /xyz ajp://localhost:9999/xyz
ProxyPassReverse /xyz http://localhost/xyz
ProxyPass /xyz ajp://localhost:9999/xyz
ProxyPassReverse /xyz http://localhost/xyz
<Directory /var/www/html>
RewriteEngine on
RewriteBase /
RewriteRule ^xyz/(.*)$ /abc/$1 [PT]
</Directory>
the url in the browser is always rewritten as "http://example.com/xyz"
RewriteRule ^xyz/(.*)$ /abc/$1 [PT]
ProxyPass /abc ajp://localhost:9999/xyz
ProxyPassReverse /xyz http://localhost/abc
<Directory /var/www/html>
RewriteEngine on
RewriteBase /
RewriteRule ^xyz/(.*)$ /abc/$1 [PT]
</Directory>
So, my understanding is that the request for "xyz" can only come from the Tomcat. Thus user only knows about "abc".
RewriteRule onething otherthing [L]