Skip to content
  • Recent
  • Tags
  • Popular
  • Users
  • Search
Skins
  • Light
  • Brite
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse

Lay Theme Forum

  1. Home
  2. General Discussion
  3. Create a 404 page / prevent Theme from redirecting to index

Create a 404 page / prevent Theme from redirecting to index

Scheduled Pinned Locked Moved General Discussion
7 Posts 3 Posters 758 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M
    M
    mw
    wrote on last edited by
    #1

    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.php
    

    And probably need to delete the rewrite Engine stuff, but I am scared.

    Could someone help me?

    Kind regards,
    Markus

    1 Reply Last reply
    0
    • RichardR
      RichardR
      Richard
      Global Moderator
      wrote on last edited by Richard
      #2

      Dear Markus @mw

      Will forward this to Armin as i'm sure he has better insight than me! :)

      Talk soon & have a wonderful day

      Sincerely
      Richard

      1 Reply Last reply
      0
      • M
        M
        mw
        wrote on last edited by
        #3

        Hey @Richard,
        have you heard anything from @arminunruh regarding this? :)

        Best,
        Markus

        1 Reply Last reply
        0
        • RichardR
          RichardR
          Richard
          Global Moderator
          wrote on last edited by
          #4

          Dear Markus @mw

          Apologies for the delay, i know this is unintentional.
          Will forward again, Armin has been very busy with Woo-commerce integration.

          Once again apologies & have a wonderful day

          Sincerely
          Richard

          1 Reply Last reply
          0
          • M
            M
            mw
            wrote on last edited by
            #5

            Sure, no problem @Richard , I can imagine!

            1 Reply Last reply
            1
            • arminunruhA
              arminunruhA
              arminunruh
              Global Moderator
              wrote on last edited by
              #6

              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

              1 Reply Last reply
              0
              • M
                M
                mw
                wrote on last edited by
                #7

                Alright, Thank you @arminunruh !

                1 Reply Last reply
                1

                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
                Reply
                • Reply as topic
                Log in to reply
                • Oldest to Newest
                • Newest to Oldest
                • Most Votes


                Online Users
                I
                Ingi
                Forgot your key, lost your files, need a previous Lay Theme or Addon version? Go to www.laykeymanager.com
                laytheme.com
                • Login

                • Don't have an account? Register

                • Login or register to search.
                • First post
                  Last post
                0
                • Recent
                • Tags
                • Popular
                • Users
                • Search