A
A
Alexey Vladimirovich2015-05-13 14:30:19
Apache HTTP Server
Alexey Vladimirovich, 2015-05-13 14:30:19

How to get GET parameter from htaccess in Node.JS?

There is an htaccess rule, for example:

RewriteRule ^node(/?)$ index.php?do=nodeme [L]

How to enable the node to read GET under the identifier do when going to www.example.ru/node?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
T
Timur Shemsedinov, 2015-05-13
@Genocide

It’s your Apache that looks to the outside world at 80, it’s better to use nginx for this, of course, but you can also make a reverse proxy in Apache, install mod_proxy, raise the node on port 8080, and then write in .htaccess:

RewriteEngine on
RewriteBase /
RewriteRule ^node/index.php\?do=(.*)$ http://127.0.0.1:8080/$1 [P]
ProxyPassReverse /node/ http://127.0.0.1:8080/

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question