This forum has been archived. All content is frozen. Please use KDE Discuss instead.

Hide .php extension from window server hosting

Tags: None
(comma "," separated)
rchan
Registered Member
Posts
1
Karma
0
I've site host on asphostportal and I am trying to hide .php extension from window based hosting.
I am trying this using web.config
Code: Select all
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
  <system.webServer>
        <rewrite>
         <rule name="hide .php extension" stopProcessing="true">
          <match url="(.*)" />
           <conditions>
                <add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" />
                <add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" />
           </conditions>
         <action type="Rewrite" url="{R:1}.php" />
        </rule>
  </rewrite>
</system.webServer>
</configuration>


It shows 404 error, Please suggest where is the problem.
Thank you


Bookmarks



Who is online

Registered users: bartoloni, Bing [Bot], Google [Bot], Sogou [Bot], Yahoo [Bot]