yii giving 404 after wordpress permalink settings

I use both WordPress and yii. Yii has been installed inside WordPress directory ( say directory name is ‘portal’).Today I have changed WordPress permalink to “http://localhost/wp//%postname%/” as per WordPress rule.Now my yii2 application shows 404.

I came to know My server use IIS

This is where all files


Now when I access http://localhost/wp/portal/login , it gives 404 error.I can access wordpress pages but not yii2 pages. my current htaccess of WordPress is as follows

# BEGIN WordPress

<IfModule mod_rewrite.c>

RewriteEngine On

RewriteBase /wp/

RewriteRule ^index\.php$ - [L]

RewriteCond %{REQUEST_FILENAME} !-f

RewriteCond %{REQUEST_FILENAME} !-d

RewriteRule . /wp/index.php [L]


# END WordPress

and web.config is (becuse its run under IIS)

<?xml version="1.0" encoding="UTF-8"?>



<directoryBrowse enabled="false" />



      <rule name="Hide Yii Index" stopProcessing="true">

        <match url="." ignoreCase="false" />


        <add input="{REQUEST_FILENAME}" matchType="IsFile" 

              ignoreCase="false" negate="true" />

        <add input="{REQUEST_FILENAME}" matchType="IsDirectory" 

              ignoreCase="false" negate="true" />


        <action type="Rewrite" url="index.php" appendQueryString="true" />






Earlier I use WordPress default permalinking and everything works under this settings but wordpress url was not seo friendly. I use WordPress for managing content and yii for application. I use yii2.0.2 basic templates and WordPress 4 version