Jump to content

Recommended Posts

I've got a URL 


I am having a problem trying to change this to through IIS rewrite




and another question throught chaging..  is this can be rewrite without redirecting and load the controller directly " aggrement controller"


I'm using codeigniter 3 as php framework.


Thank you



Link to post
Share on other sites

I have tried to use this rule but ai'nt working as others as well.. is the issue with  ?aggrement..  as it identify it as Get request.

       <match url="http://sub.domain.com/index.php?aggrement" />
       <action type="Rewrite" url="http://sub.domain.com/index.php/aggrement" />
Link to post
Share on other sites

The URL is only the path portion. You probably don't need to concern yourself with the domain, so really all you need is to match the index.php and add a condition for the query string.

	<match url="^index\.php$" />
	<conditions logicalGrouping="MatchAll">
		<add input="{QUERY_STRING}" matchType="Pattern" pattern="^aggrement$" />
	<action type="Rewrite" url="index.php/aggrement" appendQueryString="false" />
I think.


That does a rewrite - the user doesn't get redirected. If you want a redirection then use a "Redirect"-type action.



Link to post
Share on other sites
This thread is more than a year old.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.