WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Search goes straight to index page (3 posts)

  1. richarduk
    Member
    Posted 6 years ago #

    Any clues as to why a search should go straight back to the index.php page?

    I have got a search.php template. Permalinks have index.php/title-of-post/ format.

    Could it be .htaccess? The format of .htaccess is

    <Files .htaccess>
    
    order allow,deny
    
    deny from all
    
    </Files>
    
    Redirect 301 /index.html http://www.mysite.com/index.php
    Redirect 301 /novelsmain.html http://www.mysite.com/blah.php
    AddHandler server-parsed .htm .html
    ErrorDocument 403 /cgi-bin/advlogger/error.cgi?403
    ErrorDocument 404 /cgi-bin/advlogger/error.cgi?404
    ErrorDocument 500 /cgi-bin/advlogger/error.cgi?500
    # BEGIN WordPress
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]
    </IfModule>
    
    # END WordPress

    Any ideas greatly appreciated.

  2. richarduk
    Member
    Posted 6 years ago #

    ok, it's the redirects that do it, so it's the .htaccess

    I removed the redirects after trying repositioning, rewriting them in different formats etc.

    I haven't tried this but it looks good - http://urbangiraffe.com/plugins/redirection/

  3. richarduk
    Member
    Posted 6 years ago #

    It works!

    Without touching the .htaccess file either

Topic Closed

This topic has been closed to new replies.

About this Topic