# PHP website not running on iis or htaccess not working

**URL:** <https://www.phphelp.com/t/php-website-not-running-on-iis-or-htaccess-not-working/29805>\
**Category:** Uncategorized\
**Created:** [August 28, 2019, 2:22am UTC](https://www.phphelp.com/t/php-website-not-running-on-iis-or-htaccess-not-working/29805 "2019-08-28T02:22:59Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![tp45](https://www.phphelp.com/letter_avatar_proxy/v4/letter/t/f07891/32.png) [@tp45](https://www.phphelp.com/u/tp45)\
**Post date:** [August 28, 2019, 2:22am UTC](https://www.phphelp.com/t/php-website-not-running-on-iis-or-htaccess-not-working/29805/1 "2019-08-28T02:22:59Z")

</div>

Hello  
am trying to run my website on iis but it only run the first page my is like this url [http://localhost/friendmiiDemo/](http://localhost/friendmiiDemo/) and it works but when i go to [http://localhost/friendmiiDemo/about](http://localhost/friendmiiDemo/about) it does not work i get this error [https://www.dropbox.com/s/omltzinfskxpbey/Screenshot%20(49).png?dl=0](https://www.dropbox.com/s/omltzinfskxpbey/Screenshot%20%2849%29.png?dl=0)

this is my web.config

```auto
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
    <system.webServer>
        <rewrite>
            <rules>
                <rule name="Imported Rule 1" stopProcessing="true">
                    <match url="^(.*)$" ignoreCase="false" />
                    <conditions logicalGrouping="MatchAll">
                        <add input="{R:1}" pattern="^(index\.php|assets|images|js|css|uploads|favicon.png)" ignoreCase="false" />
                        <add input="%(REQUEST_FILENAME)" matchType="IsFile" />
                        <add input="%(REQUEST_FILENAME)" matchType="IsDirectory" />
                    </conditions>
                    <action type="Rewrite" url="index.php/{R:1}" />
                </rule>
            </rules>
        </rewrite>
    </system.webServer>
</configuration>

```

the first loaded page [https://www.dropbox.com/s/qk38l9uoh5qvv1q/Screenshot%20(48).png?dl=0](https://www.dropbox.com/s/qk38l9uoh5qvv1q/Screenshot%20%2848%29.png?dl=0)  
and in the config i have these routes

```auto
$route['posts/create'] = 'posts/create';
$route['posts/update'] = 'posts/update';
$route['posts/(:any)'] = 'posts/view/$1';
$route['posts'] = 'posts/index';
$route['default_controller'] = 'pages/view';
$route['(:any)'] = 'pages/view/$1';
$route['404_override'] = '';
$route['translate_uri_dashes'] = FALSE;

```

i really don’t know what is wrong  
Please help  
Thanks in advance
