WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] 404 Error not showing on main site (9 posts)

  1. propress
    Member
    Posted 1 year ago #

    I had installed multisite using subdomain wildcard but 404 Error not showing on main site when typing wrong words but other subdomain working correctly, My main site domain is: http://www.sabprice.com

  2. What's in your .htaccess?

  3. propress
    Member
    Posted 1 year ago #

    My .htaccess:

    RewriteEngine On
    RewriteBase /
    RewriteRule ^index\.php$ - [L]
    
    # uploaded files
    RewriteRule ^files/(.+) wp-includes/ms-files.php?file=$1 [L]
    
    # add a trailing slash to /wp-admin
    RewriteRule ^wp-admin$ wp-admin/ [R=301,L]
    
    RewriteCond %{REQUEST_FILENAME} -f [OR]
    RewriteCond %{REQUEST_FILENAME} -d
    RewriteRule ^ - [L]
    RewriteRule ^(wp-(content|admin|includes).*) $1 [L]
    RewriteRule ^(.*\.php)$ $1 [L]
    RewriteRule . index.php [L]
  4. Okay, when I go to your site and put in http://www.sabprice.com/lhwdfkjhsdf it redirects me to http://www.sabprice.com

    If I go to http://wwsfasdw.sabprice.com it sends me to http://www.sabprice.com

    Those aren't 404 errors but they're not right either. What's a working subdomain?

  5. propress
    Member
    Posted 1 year ago #

  6. Did you setup noblogredirect in your wp-config?

  7. propress
    Member
    Posted 1 year ago #

    yes.

  8. propress
    Member
    Posted 1 year ago #

    Thanks Mika Epstein,

    I was checked link, and I create a folder in wp-content called : mu-plugins, in the mu-plugins i just insert a php file name custom.php with this content <?php
    remove_action( 'template_redirect', 'maybe_redirect_404' );
    ?>

    That now working.
    Thanks.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.