Create a 404 page / prevent Theme from redirecting to index
-
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 !
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login