Home How can I catch all routes with apache and html
Reply: 0

How can I catch all routes with apache and html

user567
1#
user567 Published in May 20, 2018, 10:15 am

I write a js script in index.html that parse URL and redirect to a proper destination. e.g it parses example.com/#/info and shows a proper link.

I want that it handle any URL such example.com/xyz. but it shows 404 error.
when I add .htaccess like this:

RewriteEngine on
RewriteBase /

RewriteCond %{REQUEST_URI} !^/#

# Rewrite all those to insert /folder
RewriteRule ^(.*)$ /#/$1 [L,R=301]

But it doesn't work. it throws a too_many_redirects error.

You need to login account before you can post.

About| Privacy statement| Terms of Service| Advertising| Contact us| Help| Sitemap|
Processed in 0.304985 second(s) , Gzip On .

© 2016 Powered by mzan.com design MATCHINFO