0

I have my angular application 7.1.4 running on apache 2.4.10 server. I use PathLocationStrategy to route my urls.

Here is a glimpse at my index.html file

<meta http-equiv="X-UA-Compatible" content="IE=Edge" />
<meta http-equiv="Cache-control" content="no-cache, no-store, must-revalidate">
<meta http-equiv="Pragma" content="no-cache">
<meta http-equiv="Expires" content="0" />
<title>Intranet</title>
<base href="/">

.htaccess file

Options +FollowSymlinks

RewriteEngine On

RewriteCond %{REQUEST_FILENAME} -f [OR]

RewriteCond %{REQUEST_FILENAME} -d

RewriteRule ^ - [L]

RewriteRule ^ /index.html [L]

The problem is, if my URL looks like

http://intranet.company.com/app/myspace?id=favorites

Apache redirects to

http://intranet.company.com/index.html?id=favorites

and my target page is not shown.

How can I solve this knowing that my URLs starts all with BASE_URI/app/...

1 Answer 1

0

Remove / infront of index.html

   RewriteRule ^ index.html [L]
Sign up to request clarification or add additional context in comments.

1 Comment

Still the same issue.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.