Reputation: 9
Im currently struggling to get my .htaccess file to work how i want it.
When a request is sent to https://spitfox.com/riot/get
it should use port 49876
When another request is sent to https://spitfox.com/browser/get
it should use port 3336
Im currently expirimenting with this file:
RewriteEngine On
RewriteRule ^riot$ http://127.0.0.1:49876/ [P,N]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ http://127.0.0.1:49876/$1 [P,N]
RewriteRule ^browser http://127.0.0.1:3336/ [P,N]
Options All -Indexes
and it works for the /riot/get part but not for the /browser/get part and i cant figure out why.
Thanks for helping!
Upvotes: 0
Views: 47
Reputation: 9
Fixed it with trial and error!
This is the solution:
RewriteEngine On
RewriteRule ^riot$ http://127.0.0.1:49876/ [P,N]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^browser/get$ http://127.0.0.1:3336/browser/get [P]
RewriteRule ^browser/add$ http://127.0.0.1:3336/browser/add [P,QSA]
RewriteRule ^browser/update$ http://127.0.0.1:3336/browser/update [P,QSA]
RewriteRule ^(.*)$ http://127.0.0.1:49876/$1 [P,L]
Options All -Indexes
Upvotes: 1