• Hello

    I hope somebody can help me because there is very little information to find about this error and it’s a huge problem.

    I installed WordPress about a month ago. For a while everything went well but then out of a sudden, the search function decided to stop working. I made a new theme and applied it to my existing content and gues what, it worked again. For one day! Now it’s still broken and there is nog logical reason for it because i haven’t made changes to the theme.

    I have tried plugins but it wont work. My site is at https://www.fotocursus.dadu.be/

    Is there somebody who is wiser then me about this topic and can help me out?

    Greetings,
    Indigo

Viewing 15 replies - 1 through 15 (of 22 total)
  • Don’t even see a Search on your site so can’t tell.

    Thread Starter indigo-diingo

    (@indigo-diingo)

    It is the magenta frame on top of the sidebar.

    You have the wordpress installation under a sub-directory /wordpress/
    But the search form is

    <form method="get" action="https://www.fotocursus.dadu.be/">
    <div>
    	<input class="zoekvak" type="text" value="" name="s" id="s" size="15" />
    	<input class="zoek" type="submit" id="searchsubmit" value="" />
    </div>
    </form>

    Either update your form action to
    https://www.fotocursus.dadu.be/wordpress/

    or use a htaccess rule to redirect the request.

    Thread Starter indigo-diingo

    (@indigo-diingo)

    I’ve tried the https://www.dadu.be/wordpress/ but it doesn’t work either. Besides I have already a htaccess file that redirects https://www.fotocursus.dadu.be/wordpress/ to https://www.fotocursus.dadu.be/

    Can you paste the content of your htaccess file here.

    Thread Starter indigo-diingo

    (@indigo-diingo)

    Yeah, here you are

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

    # END WordPress

    No, the htaccess file in the root directory that redirects / to wordpress/

    Thread Starter indigo-diingo

    (@indigo-diingo)

    Strangely enough, those are exactly the same

    This is my structure:

    Fotocursus (root dir)
    – wordpress
    — wp-admin
    — wp-content
    — wp-includes
    — .htaccess
    – .htaccess

    Check
    RewriteBase /wordpress/
    I’m sure that would be different.

    might be
    RewriteBase /
    in root dir

    !?

    Thread Starter indigo-diingo

    (@indigo-diingo)

    Root:

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

    # END WordPress

    WordPress dir:

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

    # END WordPress

    So this is not supposed to be the same?

    Thanks for the help till now!

    Ok.
    Do you have something in the /index.php like (index.php in root dir)
    require(‘./blog/wp-blog-header.php’);

    Tamil got it correct. It appears rewrite the URL is causing the issue. Looks like it works if you manually try the search with adding the wordpress directory to the URL.
    The ReWriteBase is correct for both. It is setting /wordpress as the root URL. That is what rewritebase is for.
    Is there a reason why you are doing that? That could mess with other things than just search. Would more recommend moving wordpress to the root URL and getting rid of the rewritebase. There are directions to do this in the DOCS area. I don’t see you doing any of the things that would require rewritebase.
    Changing the search link might not work because after the search is executed it is rewriting the URL.

    Thread Starter indigo-diingo

    (@indigo-diingo)

    Yes, it’s called index.php and is the same in the root dir as wel as in the wordpress dir.

    This it the complete content from index.php:

    <?php
    /**
    * Front to the WordPress application. This file doesn’t do anything, but loads
    * wp-blog-header.php which does and tells WordPress to load the theme.
    *
    * @package WordPress
    */

    /**
    * Tells WordPress to load the WordPress theme and output it.
    *
    * @var bool
    */
    define(‘WP_USE_THEMES’, true);

    /** Loads the WordPress Environment and Template */
    //require(‘./wp-blog-header.php’);
    require(‘./wordpress/wp-blog-header.php’);
    ?>

    I also have a problem when i login, wordpress redirects me then to a not fout page of my blog instead of the admin dashboard. This problem is not to serious because it doesn’t actually brake the blog. I just tell you this in case it’s related to the search problem.

    Can you check the urls of,
    WordPress address (URL) and Blog address (URL)
    You can find them under WordPress Admin. Settings >> General

    WordPress address should be https://www.fotocursus.dadu.be/wordpress/
    Blog address should be https://www.fotocursus.dadu.be/

    Thread Starter indigo-diingo

    (@indigo-diingo)

    yeah, they are like u suggested with the only small difference that when I save them, WordPress automatically removes the backslash at the end of the url.

Viewing 15 replies - 1 through 15 (of 22 total)
  • The topic ‘Search does not work at all!’ is closed to new replies.