Keep Server Online
If you find the Apache Lounge, the downloads and overall help useful, please express your satisfaction with a donation.
or
A donation makes a contribution towards the costs, the time and effort that's going in this site and building.
Thank You! Steffen
Your donations will help to keep this site alive and well, and continuing building binaries. Apache Lounge is not sponsored.
| |
|
Topic: Error 404 and 500 |
|
Author |
|
oracle765
Joined: 28 Jun 2015 Posts: 3 Location: Brisbane
|
Posted: Mon 31 Oct '16 14:19 Post subject: Error 404 and 500 |
|
|
Hi professionals
I am trying to get my page-not-found.php file to display when there is a 404 or 500 error i have tried everything
here is a few lines of my htaccess file I have also tried the forward slash but that does not work EG
ErrorDocument 404 /page-not-found
Any ideas, that would be appreciated
----------------------------------------
AddDefaultCharset UTF-8
RewriteEngine on
#force to https
RewriteCond %{HTTPS} =off [OR]
RewriteCond %{HTTP_HOST} !=www.compareandchoose.com.au
RewriteRule ^ https://www.compareandchoose.com.au%{REQUEST_URI} [L,R=301]
#Remove php from page
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ $1.php [L,QSA]
##Custom 404 errors
ErrorDocument 404 page-not-found
##Custom 500 errors
ErrorDocument 500 page-not-found |
|
Back to top |
|
spser
Joined: 29 Aug 2016 Posts: 97
|
Posted: Tue 01 Nov '16 5:27 Post subject: |
|
|
ErrorDocument 404 /a.html
testing ok |
|
Back to top |
|
|
|
|
|
|