Take the 2-minute tour ×
Webmasters Stack Exchange is a question and answer site for pro webmasters. It's 100% free, no registration required.

I have a node.js application running behind an Apache mod_rewrite proxy configured in a .htaccess file like this:

RewriteCond %{HTTP_HOST} =mydomain.com [OR]
RewriteCond %{HTTP_HOST} =www.mydomain.com
RewriteRule (.*) http://localhost:3000/$1 [QSA,P]

When I now do a redirect (e.g. express' res.redirect()) inside my node.js application (which runs on port 3000), the user is always redirected to http://localhost:3000/ (which is in fact exactly what is defined above but not the desired behaviour).

Is there any way around this?

share|improve this question
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.