title: Fishpig: Autologin not working authentication exception because of index.php
body: <p>I have Fishpig Wordpress Integration installed along with Magento CE 1.702.</p>
  
  <p>Wordpress is set up like this :    </p>
  
  <pre><code>Database
      Charset                              utf8
      Table Prefix                         wp_
  integration
      Integrate Theme                      Yes
      Home URL                             blog
      Path                                 wp
      Single Store                         no
  </code></pre>
  
  <p>I removed index.php from the frontend using this rewrite rule :</p>
  
  <pre><code>`&lt;IfModule mod_rewrite.c&gt;
  RewriteEngine On
  RewriteBase /
  RewriteRule ^index\.php$ - [L]
  RewriteCond %{REQUEST_FILENAME} !-f
  RewriteCond %{REQUEST_FILENAME} !-d
  RewriteRule . /index.php [L]
  &lt;/IfModule&gt;`
  </code></pre>
  
  <p>The problem is the Fishpig Wordpress autologin has stopped working with the error: </p>
  
  <blockquote>
    <p>Unable to login. Check your WordPress Admin login details below.</p>
  </blockquote>
  
  <p>Stacktrace : </p>
  
  <pre><code>&gt; 2014-05-08T13:25:36+00:00 DEBUG (7): exception 'Exception' with message 'WordPress Auto Login Failed: HTTP/1.1 401 Authorization Required
  Date: Thu, 08 May 2014 13:25:36 GMT
  Server: Apache/2.2.22
  Vary: Accept-Encoding
  Content-Length: 482
  Content-Type: text/html; charset=iso-8859-1' in /nfs/c03/h03/mnt/168517/domains/dummyurl.com/html/app/code/community/Fishpig/Wordpress/Helper/System.php:493
  Stack trace:
  #0 /nfs/c03/h03/mnt/168517/domains/dummyurl.com/html/app/code/community/Fishpig/Wordpress/controllers/Adminhtml/WordpressController.php(34): Fishpig_Wordpress_Helper_System-&gt;loginToWordPress('myUserName', 'myPassword', 'http://dummyurl...')
  #1 /nfs/c03/h03/mnt/168517/domains/dummyurl.com/html/app/code/core/Mage/Core/Controller/Varien/Action.php(419): Fishpig_Wordpress_Adminhtml_WordpressController-&gt;loginAction()
  #2 /nfs/c03/h03/mnt/168517/domains/dummyurl.com/html/app/code/core/Mage/Core/Controller/Varien/Router/Standard.php(250): Mage_Core_Controller_Varien_Action-&gt;dispatch('login')
  #3 /nfs/c03/h03/mnt/168517/domains/dummyurl.com/html/app/code/core/Mage/Core/Controller/Varien/Front.php(176): Mage_Core_Controller_Varien_Router_Standard-&gt;match(Object(Mage_Core_Controller_Request_Http))
  #4 /nfs/c03/h03/mnt/168517/domains/dummyurl.com/html/app/code/core/Mage/Core/Model/App.php(354): Mage_Core_Controller_Varien_Front-&gt;dispatch()
  #5 /nfs/c03/h03/mnt/168517/domains/dummyurl.com/html/app/Mage.php(683): Mage_Core_Model_App-&gt;run(Array)
  #6 /nfs/c03/h03/mnt/168517/domains/dummyurl.com/html/index.php(87): Mage::run('', 'store')
  #7 {main}
  </code></pre>
  
  <p>I contacted Fishpig support and they said :</p>
  
  <blockquote>
    <p>You need to configure your Magento installation not to use index.php.</p>
  </blockquote>
  
  <p>I removed index.php from the admin area like this : </p>
  
  <pre><code>    RewriteRule ^index.php/admin/(.*)$ /my-admin/$1 [L,R]
  </code></pre>
  
  <p>This didn't fix the autologin problem and I noticed that the autologin button url contained the index.php so I removed index.php in the wordpress .htaccess like this :</p>
  
  <pre><code>&lt;IfModule mod_rewrite.c&gt;
  RewriteEngine On
  RewriteBase /wp/
  RewriteRule ^index\.php$ - [L]
  RewriteCond %{REQUEST_FILENAME} !-f
  RewriteCond %{REQUEST_FILENAME} !-d
  RewriteRule . /wp/index.php [L]
  RewriteRule ^/wp/index.php/(.*)$ /wp/$1 [L,R]
  &lt;/IfModule&gt;
  </code></pre>
  
  <p>This removed the index.php from the admin url but not in the autologin button</p>
  
  <p><a href="http://dummyurl.com/index.php/admin/wordpress/login/key/72a947f0e9452bfd6e92258d31ce7cd2/" rel="nofollow">http://dummyurl.com/index.php/admin/wordpress/login/key/72a947f0e9452bfd6e92258d31ce7cd2/</a></p>
  
  <p>I have been searching and wrecking my head with this, any help is appreciated. </p>