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

News and General

hossein.hajimali's avatar
hossein.hajimali
4 posts
about 11 years ago
hossein.hajimali's avatar hossein.hajimali

hi everyone i have a multiple 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:

http://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, 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>

i don’t know what to do with it, please help thanks

       
Büro Ballmann Weber's avatar
Büro Ballmann Weber
30 posts
10 years ago
Büro Ballmann Weber's avatar Büro Ballmann Weber

hi hussein,

a bit late but have you tried another htaccess-code? try this one:

<IfModule mod_rewrite.c>
        RewriteEngine On
        RewriteBase /

        # 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 ^(.*)$ /index.php/$1 [L]
</IfModule>

regards, matthias

       

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.