0

I'm on a shared virtual host and there I had a homepage with angularjs <> php. The htaccess file looked like this:

RewriteEngine on
RewriteCond %{REQUEST_FILENAME} -f [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^ - [L]
RewriteRule ^ index.html [L]

This worked great for refreshing or directing from nearly every URL to index.html. But now I switched to angularjs <> nodejs. It's coupled like this:

angularjs <> nodejs <> service <> apache

So I needed a new htaccess file with a proxy it now looks like this:

RewriteEngine On
RewriteRule ^(.*) http://localhost:64913/$1 [P]

I tried to get back my old refreshing / redirecting back. But no matter what I tried it ended up giving me Errors like:

Error: ENOENT, stat'{some long link}'

Does someone know what to do?

Vhanx
  • 1
  • 2

1 Answers1

0

I don't think this is the right way. RewriteRule can't act as a PIPE to node process. it can not be so simple.

What You should do is use Proxypass directive of apache. Also see this answer

Community
  • 1
  • 1
enRaiser
  • 2,606
  • 2
  • 21
  • 39
  • The problem is i don't have any other way to access any options only .htaccess. Proxypass doesnt work with .htaccess files. [See this](http://stackoverflow.com/questions/12808506/can-proxypass-and-proxypassreverse-work-in-htaccess) and even look at the responses of the answer. – Vhanx Apr 08 '16 at 09:20
  • since you are using shared resources, I don't thing you can do this. its better to ask your provider. in my case he suggested an alternate way of adding some extra parameter to config file. – enRaiser Apr 08 '16 at 09:23
  • I guess you are stuck now. You should go for an cloud server. – enRaiser Apr 08 '16 at 09:35