Skip to content
  • Recent
  • Tags
  • Popular
  • Users
  • Search
Skins
  • Light
  • 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 334 Views
  • 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 Offline
    M Offline
    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 Offline
      RichardR Offline
      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 Offline
        M Offline
        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 Offline
          RichardR Offline
          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 Offline
            M Offline
            mw
            wrote on last edited by
            #5

            Sure, no problem @Richard , I can imagine!

            1 Reply Last reply
            1
            • arminunruhA Offline
              arminunruhA Offline
              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 Offline
                M Offline
                mw
                wrote on last edited by
                #7

                Alright, Thank you @arminunruh !

                1 Reply Last reply
                1
                Reply
                • Reply as topic
                Log in to reply
                • Oldest to Newest
                • Newest to Oldest
                • Most Votes


                I also code custom websites or custom Lay features.
                šŸ’æ Email me here: šŸ’æ
                info@laytheme.com

                Before you post:
                1. When using a WordPress Cache plugin, disable it or clear your cache.
                2. Update Lay Theme and all Lay Theme Addons
                3. Disable all Plugins
                4. Go to Lay Options → Custom CSS & HTML, click "Turn Off All Custom Code", click "Save Changes"

                This often solves issues you might run into

                When you post:
                1. Post a link to where the problem is
                2. Does the problem happen on Chrome, Firefox, Safari or iPhone or Android?
                3. If the problem is difficult to explain, post screenshots / link to a video to explain it
                Online Users
                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