AnswerBun.com

Rewrite rules for angular and express server

Stack Overflow Asked by Mirzet Zukic on December 17, 2020

I have node js (express server) as backend for my Angular app and I add rewrite rules to .htaccess, but API call to my express server isn’t correct because rewrite rules. When I deleted my rewrite rules then express server works properly.
My rewrite rules

RewriteEngine On
RewriteCond %{DOCUMENT_ROOT}%{REQUEST_URI} -f [OR]   
RewriteCond %{DOCUMENT_ROOT}%{REQUEST_URI} -d
RewriteRule ^ - [L]

RewriteRule ^ /index.html

It means if I have rewrite rule I got parse error, like this

ERROR Error: Uncaught (in promise): e: {"headers":{"normalizedNames": 
{},"lazyUpdate":null},"status":200,"statusText":"OK","url"

Add your own answers!

Related Questions

Anomalous scanf behaviour in C

3  Asked on November 17, 2021 by parth-sarthi-sharma

     

Stop message box on a given situation Excel VBA

1  Asked on November 17, 2021

   

Is there any way to cast timedelta64 to int64 in numba?

2  Asked on November 17, 2021 by anton-philippoff

       

How do I make certain command arguments?

1  Asked on November 16, 2021 by yeti

     

Why does Vec expect &T as the argument to binary_search?

1  Asked on November 16, 2021 by grexis

 

Is it possible to hide data in a bitmap using LockBits?

1  Asked on November 16, 2021 by jeremy-james

       

Repeated filtering on Spark Dataframe?

2  Asked on November 16, 2021 by jeff-gong

     

Can Excel VSTO add-ins call Excel web add-ins?

1  Asked on November 16, 2021 by eli-chen

   

Python List: Replace Double Quotes with Single Quotes

3  Asked on November 16, 2021 by dataplumber

       

Ask a Question

Get help from others!

© 2022 AnswerBun.com. All rights reserved. Sites we Love: PCI Database, MenuIva, UKBizDB, Menu Kuliner, Sharing RPP, SolveDir