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.

Removing index.php in latest version of EE leaves ? in url

April 17, 2014 10:53am

Subscribe [1]
  • #1 / Apr 17, 2014 10:53am

    matthewcarleton

    25 posts

    So here is the code I am using in my htaccess file.

    <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>
    <FilesMatch ".(ico|jpg|jpeg|png|gif|js|css|swf)$">
        Header set Expires "Tue, 16 Jun 2020 20:00:00 GMT"
        </FilesMatch>
    Options +FollowSymLinks
    RewriteEngine on
    RewriteCond %{HTTP_HOST} ^parachuterealty.ca [NC]
    RewriteRule ^(.*)$ <a href="http://www.parachuterealty.ca/$1">http://www.parachuterealty.ca/$1</a> [R=301,L]
    
    ####################
    # GZIP COMPRESSION #
    ####################
    SetOutputFilter DEFLATE
    AddOutputFilterByType DEFLATE text/html text/css text/plain text/xml application/x-javascript application/x-httpd-php
    BrowserMatch ^Mozilla/4 gzip-only-text/html
    BrowserMatch ^Mozilla/4\.0[678] no-gzip
    BrowserMatch \bMSIE !no-gzip !gzip-only-text/html
    BrowserMatch \bMSI[E] !no-gzip !gzip-only-text/html
    SetEnvIfNoCase Request_URI \.(?:gif|jpe?g|png)$ no-gzip
    Header append Vary User-Agent env=!dont-vary

    So doing this and removing index.php from general configuration gets me a url like this:

    example.com/?/contact

    Not only does this look gross but it also break my EE contact form. When submitting to the form It doesn’t go through and just redirects to the site’s homepage with no explanation.

    Anyone else having these issues?

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

ExpressionEngine News!

#eecms, #events, #releases