P
P
Puma Thailand2012-02-13 04:15:18
Apache HTTP Server
Puma Thailand, 2012-02-13 04:15:18

Mod rewrite, how to redirect all pages of the site to one (not a redirect)?

I'm trying to use a simple design in a mod rewrite.
RewriteEngine On
RewriteBase /
RewriteRule * /index.html
Swears on syntax.
What's wrong?
The essence of the task for any link to show one and the same page.

Answer the question

In order to leave comments, you need to log in

3 answer(s)
A
Alex Bunin, 2012-02-13
@opium

It would be nice to indicate what kind of error and on which line.
I usually write the last line like this:
RewriteRule ^.+$ /index.html

W
wcoder, 2012-02-13
@wcoder

RewriteEngine on
RewriteRule ^(.*)$ index.html [L]

Z
zuborg, 2012-02-13
@zuborg

Alias ​​/img/ /home/user/domain.com/img/
AliasMatch / /home/user/domain.com/index.html otherwise there
will be less load on Apache, without mod_rewrite

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question