ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

After 2.7.2 upgrade, search form redirects to home page

October 30, 2013 7:51am

Subscribe [5]
  • #1 / Oct 30, 2013 7:51am

    Rob Lyons

    34 posts

    I’ve seen this problem mentioned a few times with earlier versions. When I do a search, rather than taking me to the search results page, I get taken back to the homepage.

    A few other quirks, which may be related or not:

    1. Homepage - http://www.psi.org.uk redirects to http://www.psi.org.uk/index.php despite having set up .htaccess to remove index.php

    2. CSS templates no longer work. Not a big problem, just linked to them externally, but annoying.

    Any suggestions on avenues for investigation gratefully received.

  • #2 / Oct 30, 2013 10:19am

    Ralph

    78 posts

    Have you set Name of your site’s index page in Admin > General configuration to blank? That might solve the problem with index.php on your homepage. I’m not sure about the search problem though.

  • #3 / Dec 03, 2013 2:45pm

    i’ve had the same problems with search - recent;y/
    Unless the site index page is actually specified (in which case it will be visible in any URL), the search always returns to the home page - sitename.com
    I’m using mod rewrite which works perfectly to eliminate the index.php from the URL

    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule ^(.*)$ /index.php?/$1 [L]

    This problem seems not uncommon.  What gives?

  • #4 / Dec 04, 2013 12:27pm

    Kurt Deutscher

    827 posts

    It’s working for us.

    We set up a template group just for our search results so the first segment of our URI is for the results.

    result_page='search-cats'

    http://goodmews.org/catabase/adoptable-cats/

    *hint.. EE’s search form is lower on the page (google’s is at the top).

    The “search-cats/index” template embeds the search results page.

    We also make sure that the “Search Results URL” path is empty in every channel of the website (check your channel preferences), especially when we’re searching a channel that’s devoted to a special task like the “catabase” example above.

    In General Configuration make sure that “Name of your site’s index page” is also blank.

    We set our .htaccess up this way:

    # remove index.php
    RewriteCond $1 ^(index\.php)?$ [OR]
    RewriteCond $1 !\.(gif|jpe?g|png|ico|css|js)$ [NC] 
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule ^(.*)$ /index.php?/$1 [L]

    Maybe there’s something in the way we set it up that will help you get your’s working.

  • #5 / Feb 28, 2014 2:23pm

    interactive @dvl

    144 posts

    Hiya,

    We have tried pretty much everything at this point. It was working yesterday and after coming out of a testing URL to a live URL search no longer works. Could it be a server issue? Thanks for any other suggestions.

    M~

  • #6 / Feb 28, 2014 2:30pm

    Kurt Deutscher

    827 posts

    Any chance you’ve set the MSM variables in your index.php file, or haven’t updated it in a while? We had issues last year with needing to comment out one of the three (can’t remember which one, sorry) $asign_to_config variables in that file to get our search form’s return path to work.

    Also, even if you’ve updated the paths to the live site in your EE CP, double-check that the permissions on the config.php file for EE allowed the server to update paths in it. That’s also hung up the search for us in the past.

    Oh.. and clear all caches under tools.

    If you’ve ruled those out, let me know and I’ll think harder about this for you.

  • #7 / Feb 28, 2014 4:54pm

    interactive @dvl

    144 posts

    Hi Kurt,

    We are using a single install (you were referring to the MSM = multi site manager?). I made sure the config file was set to 666, it was set to 664. I also cleared the cache. Still returns to the index page. I even validated my test page and there was nothing wrong on those lines. No trace of the temp URL now either.

    I am out of ideas.

    Is it possible for there to be a problem between the host server and the server serving the A record? (grasping here :ahhh:)

    Thanks for responding. We appreciate feedback of any kind.

    M~

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases