Danny Valariola
Danny Valariola

Reputation: 1118

how to convert from IIS to apache httpd rewrite rule

I saw some examples on how to convert IIS to htaccss.

I'm using httpd conf (for performance reasons) + i used online converter for IIS --> htaccess.

when converting this rule:

<rule name="videorecords URL" patternSyntax="Wildcard">
    <match url="videorecords/*" />
    <conditions logicalGrouping="MatchAll" trackAllCaptures="false" />
    <action type="Rewrite" url="videorecords/{R:1}" />
</rule>

to:

#RULE VIDEORECORDS URL 
RewriteRule videorecords/* videorecords/$1 []

the apache doesnt load and i see in the logs: Syntax error on line 211 of httpd.conf: RewriteRule: unknown flag ''

Upvotes: 0

Views: 862

Answers (1)

Jon Lin
Jon Lin

Reputation: 143906

Your flags are blank: []. So you need to either add a flag in ther (like L) or remove the square brackets.

Though, I don't think that the rewrite rule online converter gave you is actually what you want.

Upvotes: 1

Related Questions