Welcome Guest, Not a member yet? Register   Sign In
Can't submit forms when using URL rewrite
#1

[eluser]dallen33[/eluser]
When I use URL rewrite, I can't seem to submit any forms that reside on a controller that isn't the default.

For example, I'm using ion_auth. If I go to http://172.24.10.48/auth/login/, hitting submit on the login form does nothing. My URL rewrite looks like this:

Code:
<rule name="auth">
    <match url="^auth/(.*)" />
    <action type="Rewrite" url="index.php/{r:0}" appendQueryString="false" />
</rule>

And my CodeIgniter app config index_page is set as: $config['index_page'] = "";

But when I add index.php to the config above, it'll work. But it adds index.php to the URL, which I don't want.

Any idea what I'm doing wrong here?
#2

[eluser]dallen33[/eluser]
I figured it out, although I'm not sure why this was causing the problem. I had the following redirect that added a slash to a URL if it didn't contain one.
Code:
<rule name="Add trailing slash" stopProcessing="true">
    <match url="(.*[^/])$" />
    <conditions>
        <add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" />
        <add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" />
    </conditions>
    <action type="Redirect" redirectType="Permanent" url="{R:1}/" />
</rule>




Theme © iAndrew 2016 - Forum software by © MyBB