Create a 404 page / prevent Theme from redirecting to index
General Discussion
7
Posts
3
Posters
652
Views
1
Watching
-
Hello :)
I'd like to have a custom 404 page. Unfortunately this dosen't seam to be possible since LayTheme (or wp) is redirecting wrong links to the index page.This is my .htaccess file - I think the problem is the part after #END WordPress with the 301
# BEGIN WordPress <IfModule mod_rewrite.c> RewriteEngine On RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}] RewriteBase / RewriteRule ^index\.php$ - [L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . /index.php [L] </IfModule> # END WordPress RewriteEngine On RewriteCond %{HTTP:X-Forwarded-Proto} !https RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]I know I need to add something like this:
ErrorDocument 404 /not-found-page.phpAnd probably need to delete the rewrite Engine stuff, but I am scared.
Could someone help me?
Kind regards,
Markus -
hey you can create a file called "404.php" in lay themes folder "wp-content" → "themes" → "lay"
however, every time you update lay theme that file will be deleted
or you could try and find a 404 wordpress plugin
other than that, please contact your webhost about htaccess questions, its not lay theme related
-
Alright, Thank you @arminunruh !
Online Users
Forgot your key, lost your files, need a previous Lay Theme or Addon version?
Go to www.laykeymanager.com