Home URL rewriting in VirtualHost causes 403 Forbidden
Reply: 0

URL rewriting in VirtualHost causes 403 Forbidden

user934 Published in June 18, 2018, 7:39 am

My frontend server is handled by Apache 2.4.

I would like that when accessing, it automatically redirects the traffic to my server's port 1001 like this:

<VirtualHost *:80>
<Directory "/">
Require all granted

RewriteEngine On
RewriteRule ^/site1(.*)$ http://localhost:1001$1 [P,L]
RewriteRule ^/site2(.*)$ http://localhost:1002$1 [P,L]
RewriteRule ^/site3(.*)$ http://localhost:1003$1 [P,L]

Problem: I get this error when opening

403: Forbidden
You don't have permission to access /areallybigpage on this server.

On the other hand, if I do, it works (there is a Python serveron port 1001, but this is not important for this question).

How to solve this?

You need to login account before you can post.

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

© 2016 Powered by mzan.com design MATCHINFO