How to remove index.php?p= permanently? I discovered search engines found duplicate content on my domain due to URLs being output with index.php?p= and index.php in ADDITION to the clean URLs.

For example, I have:


domain.com/index.php?p=about
domain.com/index.php/about
domain.com/about


And the first two requests with index.php?p= and index.php shouldn't exist. Only the last request with domain.com/about should exist.

While I found help removing index.php, some URLs continue to include ?p=.

So, now I still have:


domain.com/?p=about
domain.com/about


While all I want is:


domain.com/about


Note: This is happening to several pages and blog entries throughout the site. Not only URLs directed to about.

How may I remove ?p= permanently from the remaining URLs?

Within .htaccess, I have:

&lt;IfModule mod_rewrite.c&gt;
    RewriteEngine On

    # Remove index.php
    RewriteCond %{THE_REQUEST} ^GET.*index\.php [NC]
    RewriteCond %{REQUEST_URI} !^/index\.php/admin\b [NC] # Don't mess with admin requests
    RewriteRule (.*?)index\.php/*(.*) /$1$2 [R=301,NE,L]

    # Send would-be 404 requests to Craft
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteCond %{REQUEST_URI} !^/(favicon\.ico|apple-touch-icon.*\.png)$ [NC]
    RewriteRule (.+) index.php?p=$1 [QSA,L]
&lt;/IfModule&gt;


Within craft/config/general.php, I have:

return array(
    '*' =&gt; array(

        'omitScriptNameInUrls' =&gt; true,
    ),
);
Taken from this answer on Stack Overflow: 
.htaccess mod_rewrite: rewriting querystring to path

&lt;IfModule mod_rewrite.c&gt;
    RewriteEngine On

    # Remove index.php
    RewriteCond %{THE_REQUEST} ^GET.*index\.php [NC]
    RewriteCond %{REQUEST_URI} !^/index\.php/admin\b [NC] # Don't mess with admin requests
    RewriteRule (.*?)index\.php/*(.*) /$1$2 [R=301,NE,L]

    # Remove ?p=
    RewriteCond %{THE_REQUEST} ^GET\ /\?(([^&amp;\s]*&amp;)*)p=([^&amp;\s]+)&amp;?([^\s]*)
    RewriteRule ^(.*)$ /%3?%1%4 [L,R=301]

    # Send would-be 404 requests to Craft
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteCond %{REQUEST_URI} !^/(favicon\.ico|apple-touch-icon.*\.png)$ [NC]
    RewriteRule (.+) index.php?p=$1 [QSA,L]
&lt;/IfModule&gt;


This not only reformats /?p=about as /about, but it also preserves other parts of the query string.

For example, /?p=about&amp;tag=stuff and even /?tag=stuff&amp;p=about both redirect to /about?tag=stuff.