Quantcast
Channel: All Forums
Viewing all articles
Browse latest Browse all 27852

Rewrite filemap giving 404 error- any fix?

$
0
0

HI everyone,

I have tried to enable friendly url. I have more than thousand links. So I prefer the filemap rewrite url and followed steps in  the link http://www.iis.net/learn/extensions/url-rewrite-module/using-custom-rewrite-providers-with-url-rewrite-module .

I have a file name example.php in root folder, and i wanted to reanme it as sitename.com/ first_example. And when I try to open the link, it shows me 404 error.  How can I fix this.

this is my web.config file content


            <providers>
                <provider name="FileMap" type="FileMapProvider, Microsoft.Web.Iis.Rewrite.Providers, Version=7.1.761.0, Culture=neutral, PublicKeyToken=0545b0627da60a5f">
                    <settings>
                        <add key="FilePath" value="{DOCUMENT_ROOT}\App_Data\redirectmappings.txt" />
                        <add key="IgnoreCase" value="1" />
                        <add key="Separator" value="," />
                    </settings>
                </provider>
            </providers>
    
    <rules>
        <rule name="FileMapProviderTest" stopProcessing="true">
            <match url="(.*)" />
            <conditions>
                        <add input="{FileMap:{R:1}}" pattern="(.+)" />
            </conditions>
            <action type="Rewrite" url="{C:1}" logRewrittenUrl="true" />
        </rule>
             

and this is the rewrite conditions i have in the text file,

example.php, first_example

Any help. Thanks in advance.


Viewing all articles
Browse latest Browse all 27852

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>