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.

Search function no longer working

December 20, 2010 10:42am

Subscribe [5]
  • #16 / Dec 22, 2010 3:54pm

    PhilBrienesse

    187 posts

    Sorry if its the htaccess then I’m at a loss because like i said i’ve never had a problem and i really dont understand htaccess super well thats just the code i’ve always used and its always worked.

    You could try using one of the other methods either the include or exclude method.

    You can find more info on that here http://expressionengine.com/wiki/Remove_index.php_From_URLs/

  • #17 / Dec 22, 2010 5:12pm

    soloflight

    21 posts

    Thanks for the help Phil

    So does anyone else know what in this rewrite would be keeping the search function from working? Or know how to make an exception so that search works?

    RewriteEngine On
    RewriteCond %{HTTP_HOST} ^amsafety.com.s110717.gridserver.com$ [NC]
    RewriteRule ^(.*)$ <a href="http://www.amsafety.com.s110717.gridserver.com/$1">http://www.amsafety.com.s110717.gridserver.com/$1</a> [R=301,L]
    
    # BEGIN ExpressionEngine Rewrite
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteCond $1 !\.(gif|jpe?g|png)$ [NC]
    RewriteRule ^(.*)$ /index.php?$1 [L]
    </IfModule>
    # END ExpressionEngine Rewrite
  • #18 / Dec 27, 2010 9:00am

    Sue Crocker

    26054 posts

    Thanks for the assist, Phil.

    Soloflight, unfortunately we can’t offer direct support for removing index.php via .htaccess, or with troubleshooting third party add-ons. In the mean time, moving to the CodeShare Corner for additional support.

  • #19 / Dec 27, 2010 10:14am

    soloflight

    21 posts

    Thanks Sue.

    I do have to admit though that I think it’s pretty silly that index.php remains in the default URL for ExpressionEngine. It’s something that after all these years, I thought would be removed. Clients don’t want it in there, nor do developers. It should change. And I think that Ellis Labs SHOULD offer support for removing it if a paying customer wants to.

  • #20 / Dec 27, 2010 10:25am

    Rob Sanchez

    335 posts

    A few things….

    When you look at the HTML source of your search form, what is the form’s action attribute? Does it have the www or non-www version of your domain. Also, if you remove the question mark after index.php in your .htaccess, does removing index.php from urls still work?

    RewriteRule ^(.*)$ /index.php?$1 [L]
    RewriteRule ^(.*)$ /index.php$1 [L]
  • #21 / Dec 27, 2010 10:44am

    soloflight

    21 posts

    Thanks Rob. Removing the question mark breaks my links, so I guess that’s a no, it doesn’t still work after doing that.

    There is no action attribute for the search because I’m using the Simple Search feature of ExpressionEngine. It works fine without the index.php removal.

  • #22 / Dec 27, 2010 12:38pm

    PhilBrienesse

    187 posts

    Again not sure why this would matter but it seems that sometimes subdomains cause issues.  Your domain is a little odd.  I assume its a test server.  Have you tried this out on a simple domain or a different server setup? I test and build my sites on mamp and they are always hosted on unix/apache servers and i dont have an issue with this so I just can’t figure out why it doesn’t work for you.

  • #23 / Dec 27, 2010 12:49pm

    soloflight

    21 posts

    The URL is the temporary URL for the MediaTemple account. I’ve been developing it there because it needed to be publicly visible for review. I’m sure plenty of people use MediaTemple for ExpressionEngine hosting. It is an odd problem.

    Since this site is supposed to launch at the first of the year, I’m not quite sure what to do. The client needs simpler URLs and they won’t take it with the index.php in there, understandably. And they expect the search engine to function, which it does - just not without the index.php. Both things should be easy to deliver, and for some reason in my case, they aren’t.

  • #24 / Dec 27, 2010 1:12pm

    PhilBrienesse

    187 posts

    Yes i have used media temple in the past with no issues. My only remaining idea then would be it might have something to do with the sub-domain in the url.  You could cross your fingers it disappears on launch or like i said try and test it out somewhere else first.

  • #25 / Dec 28, 2010 11:35am

    Rob Sanchez

    335 posts

    Thanks Rob. Removing the question mark breaks my links, so I guess that’s a no, it doesn’t still work after doing that.

    There is no action attribute for the search because I’m using the Simple Search feature of ExpressionEngine. It works fine without the index.php removal.

    By form action, I meant not your template, but the actual HTML source. If you view source you should find a <form> element with an action attribute.

  • #26 / Oct 11, 2011 4:17pm

    timd

    14 posts

    We struggled with this same problem and just realized the issue / solution…

    Our server details for the site in question: Linux / Apache / MySQL / PHP5 and we are using .htaccess to remove index.php

    For anyone using development servers (like rackspace for example) who have very long test URL’s until your site goes live…  These long URL’s are too long for the database to handle.

    When you try to set the Search Results URL under: Control Panel > Admin > Channels > Channel Preferences…  The database will truncate that URL if it is too long. 

    Once you launch the live website, edit that field entry and all should work.

    Hope this helps!

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

ExpressionEngine News!

#eecms, #events, #releases