A
A
Andrew2015-07-23 13:21:45
Joomla
Andrew, 2015-07-23 13:21:45

Is it possible to redirect to a given page via .htaccess?

Through .htaccess, I block access by ip to certain directories for everyone. As a consequence, when accessing the directory (page), we will see the classic:


403
Forbidden
You don't have permission to access /administrator/ on this server.

The question is: how can I redirect from this page to the right one, for example, to the main one? Only for those who are denied access accordingly.
Or do I need to generate a 403.php file? and already poking around in it?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
S
Stalker_RED, 2015-07-23
@Stalker_RED

Redirect is done something like this
You already decide whether you want to give 403 Forbidden
or some 30x Redirect
Just in case a list of HTTP codes

D
Dmitry, 2015-07-23
@2fox

ErrorDocument 403 /forbidden.html

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question