× Here you can get community support related to ReDJ.

J2.5 Redirect Problem on IIS Server

  • johntorre
  • Topic Author
  • Offline
  • New Member
  • New Member
More
10 years 9 months ago #1353 by johntorre
J2.5 Redirect Problem on IIS Server was created by johntorre
Hi, first of all I would like to thank you for developing this extension. Currently, I was able to install redj in J.2.5 and can redirect rewrite URL using ReDJ. By the way, I'm using Windows Server (IIS).

Below is a example rule that works like a charm.
From URL: /contact/page
TO: /contact/new

But unfortunately, I can't redirect a dynamic url using redj (see example below)

From URL: /index.php?option=com_contact&view=contact&id=1&Itemid=69
TO: {siteurl}

also did the following
From URL: ^/index.php?option=com_contact&view=contact&id=1&Itemid=69$
From URL: http://{siteurl}/index.php?option=com_contact&view=contact&id=1&Itemid=69
From URL: {query id,Itemid} id=1&Itemid=69 <-- dont know if this is correct

I don't know what's the problem now, I'm looking for a redirect rule for Joomla IIS that might be missing in web.config.xml but none of them makes ReDJ works redirecting dynamic url.

Here's my web.config copy

<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<system.webServer>
<rewrite>
<rules>

<rule name="Joomla! Rule 1" stopProcessing="true">
<match url="^(.*)$" ignoreCase="false" />
<conditions logicalGrouping="MatchAny">
<add input="{QUERY_STRING}" pattern="base64_encode[^(]*\([^)]*\)" ignoreCase="false" />
<add input="{QUERY_STRING}" pattern="(&gt;|%3C)([^s]*s)+cript.*(&lt;|%3E)" />
<add input="{QUERY_STRING}" pattern="GLOBALS(=|\[|\%[0-9A-Z]{0,2})" ignoreCase="false" />
<add input="{QUERY_STRING}" pattern="_REQUEST(=|\[|\%[0-9A-Z]{0,2})" ignoreCase="false" />
</conditions>
<action type="CustomResponse" url="index.php" statusCode="403" statusReason="Forbidden" statusDescription="Forbidden" />
</rule>

<rule name="Joomla! Rule 2">
<match url="(.*)" ignoreCase="false" />
<conditions logicalGrouping="MatchAll">
<add input="{URL}" pattern="^/index.php" ignoreCase="true" negate="true" />
<add input="{URL}" pattern="/component/|(/[^.]*|\.(php|html?|feed|pdf|vcf|raw))$" />
<add input="{REQUEST_FILENAME}" matchType="IsFile" ignoreCase="false" negate="true" />
<add input="{REQUEST_FILENAME}" matchType="IsDirectory" ignoreCase="false" negate="true" />
</conditions>
<action type="Rewrite" url="index.php" />
</rule>

</rules>

</rewrite>
<httpErrors>
<remove statusCode="404" subStatusCode="-1" />
<error statusCode="404" prefixLanguageFilePath="" path="/index.php" responseMode="ExecuteURL" />
</httpErrors>
</system.webServer>
</configuration>


I hope someone will help me on this. Thanks You!

Please Log in or Create an account to join the conversation.

More
10 years 9 months ago #1356 by admin
Replied by admin on topic J2.5 Redirect Problem on IIS Server
Hi,
the issue with the second non working rule is you miss to escape special chars. Rule is a regular expression so when you need, as example, a literal ? you must use \?.

Try this:
From URL: ^/index\.php\?option=com_contact&view=contact&id=1&Itemid=69$

Please, advise.

Luigi
The following user(s) said Thank You: johntorre

Please Log in or Create an account to join the conversation.

  • johntorre
  • Topic Author
  • Offline
  • New Member
  • New Member
More
10 years 9 months ago #1357 by johntorre
Replied by johntorre on topic J2.5 Redirect Problem on IIS Server
Thank you so much! I really appreciate your help.

Please Log in or Create an account to join the conversation.

More
10 years 9 months ago #1359 by admin
Replied by admin on topic J2.5 Redirect Problem on IIS Server
U're welcome... :)

Please Log in or Create an account to join the conversation.

Time to create page: 0.096 seconds