title: How to remove index.php completely in yii when user give redirect url
body: <p>I search how to remove index.php in yii.
  it's working fine, but <br>
  <a href="https://stackoverflow.com/questions/9633649/how-to-remove-index-php-in-yii-framework">How to remove index.php in Yii Framework</a></p>
  
  <p>protected/config/main.php</p>
  
  <pre><code>'urlManager'=&gt;array(
          'urlFormat'=&gt;'path',
          'showScriptName'=&gt;false,
          'rules'=&gt;array(
              'redirect/&lt;redirectUrl&gt;'=&gt;'site/index',
              'login'=&gt;'site/login',
              'privacy'=&gt;'site/privacy',
              'password'=&gt;'site/forgot',
              '&lt;controller:\w+&gt;/&lt;id:\d+&gt;'=&gt;'&lt;controller&gt;/view',
              '&lt;controller:\w+&gt;/&lt;action:\w+&gt;/&lt;id:\d+&gt;'=&gt;'&lt;controller&gt;/&lt;action&gt;',
              '&lt;controller:\w+&gt;/&lt;action:\w+&gt;'=&gt;'&lt;controller&gt;/&lt;action&gt;',
          ),
      ),
  </code></pre>
  
  <p>my htaccess file</p>
  
  <pre><code>DirectoryIndex index.php
  &lt;IfModule mod_rewrite.c&gt;
  RewriteEngine on
  
  # if a directory or a file exists, use it directly
  RewriteCond %{REQUEST_FILENAME} !-f
  RewriteCond %{REQUEST_FILENAME} !-d
  
  # otherwise forward it to index.php
  RewriteRule . index.php
  &lt;/IfModule&gt;
  </code></pre>
  
  <p>when i check the following url</p>
  
  <p>yii.mywebapp.com/index.php?redirecturl=<a href="http://www.google.com" rel="nofollow noreferrer">http://www.google.com</a></p>
  
  <p>it's working
  but i removed index.php</p>
  
  <p>yii.mywebapp.com/?redirecturl=<a href="http://www.google.com" rel="nofollow noreferrer">http://www.google.com</a></p>
  
  <p>it's also working</p>
  
  <p>but i need when some user request redirect url with 
  yii.someurl.com/index.php?redirecturl=someurl
  i want to hide index.php in the url</p>
  
  <p>please help</p>