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

file path issue with url rewriting

$
0
0

in a folder named project i have a .php file which can take parameters.

i'm using this rule:

<rule name="Friendly" stopProcessing="true"><match url="^phrasecat/(.+)$" /><conditions><add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" /><add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" /></conditions><action type="Rewrite" url="index.php?phrasecat={R:1}" /></rule>




in order to redirect requests like this:

    www.domain.com/project/phrasecat/word1

to

    www.domain.com/project/index.php?phrasecat=word1

this is done in order to have friendly urls.

it works, but the problem is, IIS thinks phrasecat is a real directory so all included files ( javascript/ css/ images ) do not get included because phrasecat folder does not exist and so everything is garbled.

is there any way around this through redirection rules? I don't want to manually create the folder and place there for a second time the resources.

thank you 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>