We use cookies to improve your experience. No personal information is gathered and we don't serve ads. Cookies Policy.

ExpressionEngine Logo ExpressionEngine
Features Pricing Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University
Log In or Sign Up
Log In Sign Up
ExpressionEngine Logo
Features Pro new Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University Blog
  • Home
  • Forums

Remove question mark from url after search submit

How Do I?

hossein.hajimali's avatar
hossein.hajimali
4 posts
10 years ago
hossein.hajimali's avatar hossein.hajimali

I have a multi-language website and my second language goes to a subdirectory mysite.com/en/. Everything is fine but the search functionality. When I submit my search, it prints a question mark right after the subdirectory like this:

mysite.com/en/?/noresult/6bc629a9319d90a1e9703eaf2c00f7cd/

And because of it my site redirects to the homepage. I searched and tried many .htaccess codes but it did not work. The URL without question mark works fine. Here is my .htaccess:

<IfModule mod_rewrite.c>
   RewriteEngine On
   RewriteBase /en/

    # Removes index.php from ExpressionEngine URLs
    RewriteCond %{THE_REQUEST} ^GET.*index\.php [NC]
    RewriteCond %{REQUEST_URI} !/system/.* [NC]
    RewriteRule (.*?)/index\.php/*(.*) /$1$2 [R=301,NE,L]

    # Directs all EE web requests through the site index file
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    #RewriteRule ^(.*)$ /en/index.php?/$1 [L]
    RewriteRule ^(.*)$ /en/index.php?/$1 [L,QSA]
</IfModule>

Please can somebody help me with this?

       

Reply

Sign In To Reply

ExpressionEngine Home Features Pro Contact Version Support
Learn Docs University Forums
Resources Support Add-Ons Partners Blog
Privacy Terms Trademark Use License

Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.