WordPress.org

Ready to get started?Download WordPress

Forums

404 (3 posts)

  1. steve555
    Member
    Posted 4 years ago #

    Hi everyone,

    I recently changed the structure of my site, making some pages "children" so that it was much better organised and user friendly.

    There are links that pointed to those pages thta users followed who will now be faced with a 404.

    Rather than go to every link on the internet and change them, is there any way i can point them to the right page? Will a 301 work and if yes how do i do it?

    Thx

    [moderated--bump removed. Please refrain from bumping as per Forum Rules]

  2. wordprest
    Member
    Posted 4 years ago #

    try adding the following line to your .htaccess file

    rewriteRule (.*) http://www.yourdomain.com/$1 [R=301,L]

    This should redirect to the home any url request.

  3. Shane G
    Member
    Posted 4 years ago #

    Hi,

    Set your desired permalink and add this code in htaccess:

    # BEGIN WordPress
    
    <IfModule mod_rewrite.c>
    ErrorDocument 404 /index.php?error=404
    RewriteEngine On
    RewriteBase /
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]
    </IfModule>
    
    # END WordPress

    Thanks,

    Shane G.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.