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.

Change Simple Search generated form output action?

December 08, 2009 3:14pm

Subscribe [2]
  • #1 / Dec 08, 2009 3:14pm

    Narzula

    69 posts

    We are using Simple Search in a subsection of our site and I have been notified that it is no longer working. Only part of our site uses EE and EE files reside in an “ee” subfolder. Index.php and “ee” are hidden from the urls using .htaccess and although not officially supported this is essential. Everything worked fine for a year and no changes have been made the the .htaccess file. But now performing a search just sends the user to the homepage.

    A workaround has been found but I’m not sure how to generate this using Simple Search.

    Currently the generated html is

    <form method="post" action="http://www.example.com/ee/">

    If this is changed using Firebug to

    <form method="post" action="http://www.example.com/ee/index.php">

    then the search works once again.

    How would one generate

    <form method="post" action="http://www.example.com/ee/index.php">?

    (and is this even possible with the “index.php”-removing .htaccess file in place?)

  • #2 / Dec 08, 2009 3:33pm

    Ingmar

    29245 posts

    The action parameter is automatically determined by your EE path settings. If you do remove index.php from your URLs, just make sure your mod_rewrite rule takes all cases, including this one, into account.

  • #3 / Dec 14, 2012 11:08am

    feeneywireless

    20 posts

    How would you change the .htaccess file to do this?  I am running into this same problem, with my search results redirecting to the home page instead of search/results.  My .htaccess file looks like so:

    RewriteEngine On 
    RewriteCond $1 !\.(gif|jpe?g|png)$ [NC]
    RewriteCond %{REQUEST_FILENAME} !-f 
    RewriteCond %{REQUEST_FILENAME} !-d 
    RewriteRule ^(.*)$ index.php?/$1 [L]

    Thanks!

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

ExpressionEngine News!

#eecms, #events, #releases