: Redirect and removing question mark on URL using htaccess When I access my site using www.example.com/blog it redirects to example.com/?/blog. How can I remove the question mark, so that the redirection
When I access my site using example.com/blog it redirects to example.com/?/blog.
How can I remove the question mark, so that the redirection just goes to example.com/blog?
My current .htaccess file:
RewriteEngine On
RewriteBase /
# Removes index.php from ExpressionEngine URLs
RewriteCond %{THE_REQUEST} ^GET.*index.php [NC]
RewriteCond %{REQUEST_URI} !/system/.* [NC]
RewriteRule (.*?)index.php/*(.*) / [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?/ [L]
More posts by @Murray155
1 Comments
Sorted by latest first Latest Oldest Best
Notice that you are rewriting URL to: /index.php?/. After this rewrite is done, the server removes index.php from URI. Thereby generating that URL. Just remove the ? from above rewrite.
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ /index.php/ [L]
Terms of Use Create Support ticket Your support tickets Stock Market News! © vmapp.org2024 All Rights reserved.