Apache2 Configuration for Single Page Application

Alles, was den Apache betrifft, kann hier besprochen werden.

Apache2 Configuration for Single Page Application

Postby accesshome » 14. October 2017 06:13

I am trying to get my single page application running with Apache2. This is my file structure:

Code: Select all
static 
- js 
- - main.js 
- css 
dashboard.html 
index.html


Now I am trying to write a .htaccess file with rewrite rules.

Code: Select all
example.com/ -> /index.html
example.com/dashboard -> /dashboard.html
example.com/dashboard/info -> /dashboard.html
example.com/dashboard/... -> /dashboard.html
example.com/static/js/main.js -> /static/js/main.js


I don't want to use redirects, just rewriting the URL. What do I have to put in the file .htaccess. It would appreciate an answer very much.
accesshome
 
Posts: 1
Joined: 14. October 2017 06:11
XAMPP version: 2
Operating System: CentOS

Re: Apache2 Configuration for Single Page Application

Postby Nobbie » 14. October 2017 20:22

There is plenty of documentation in the internet as well as tutorials. Why dont you appreciate to read those?
Nobbie
 
Posts: 13170
Joined: 09. March 2008 13:04


Return to Apache

Who is online

Users browsing this forum: No registered users and 15 guests