Toni Michel Caubet
Toni Michel Caubet

Reputation: 20173

Redirect via htacces to error pages (not found & Internal Server error)

can I vía .htaccess redirect when

Is that posible? if so, can someone help me with the rewrite rules?

edit

trying

ErrorDocument 500 /oohps.php
ErrorDocument 404 /where.php

and adding them at domain.com/oops.php and domain.com/where.php but still not loaded

Upvotes: 0

Views: 1787

Answers (2)

user1635169
user1635169

Reputation: 11

It is useful I am able to redirect to index page on 404 error(page not found) by modifying "ErrorDocument" in /etc/apache2/conf.d/localized-error-pages file.

Thanks.....

Upvotes: 1

Phil
Phil

Reputation: 164970

Why not just use custom error responses via ErrorDocument?

ErrorDocument 500 /errors/internal-server-error.html
ErrorDocument 404 /errors/not-found.html

Upvotes: 1

Related Questions