A
A
Andrew2013-10-19 13:12:46
linux
Andrew, 2013-10-19 13:12:46

How to force htaccess to transfer the user from any page to the main one?

It is necessary for users from any page, for example
site.com/login
site.com/id/14
site.com/user/23

to be redirected to site.com/ Tell me

how to do this?

I try

RewriteCond %{HTTP_HOST} ^site\.com
RewriteRule ^(.*)$ http://site.com/ [R=301,L]


but, of course, I get an infinite loop.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
asmerdev, 2013-10-19
@dasty

RewriteRule .* index.php [L]

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question