Page 1 of 1

Url not working after migration.

Posted: Tue Jul 23, 2013 2:24 pm
by andrewsmd87
You'll have to excuse me as I'm not a Joomla expert. We're a windows shop and I always work with .net custom built applications or DotNetNuke if we're using a CMS. We have a customer that installed Joomla himself and was working fine on our old web server. I migrated this to a new web server and now none of the links on the dropdown are working. I.e. region3.net works fine, but http://www.region3.net/index.php/bhecn/ ... ission-rpt gives me a 404 error. I looked and there is nothing in the web.config that handles rewrite rules, and nothing in IIS on the old server under url rewrite rules.

What I can't figure out is how this was working on the old server, but not now. They're both running the same version of IIS and PHP, the only difference is the new server is windows server 2012, where the older one was 08 r2. I don't see why that would cause an issue thought. Any ideas, it looks to me like this is joomla version 1.5

Re: Url not working after migration.

Posted: Tue Jul 23, 2013 3:25 pm
by andrewsmd87
I fixed it by adding this to a web.config file
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<system.webServer>
<rewrite>
<rules>
<clear />
<rule name="Common Exploit Blocking" stopProcessing="true">
<match url="^(.*)$" />
<conditions logicalGrouping="MatchAny">
<add input="{QUERY_STRING}" pattern="mosConfig_[a-zA-Z_]{1,21}(=|\%3D)" />
<add input="{QUERY_STRING}" pattern="base64_encode.*\(.*\)" />
<add input="{QUERY_STRING}" pattern="(\<|%3C).*script.*(\>|%3E)" />
<add input="{QUERY_STRING}" pattern="GLOBALS(=|\[|\%[0-9A-Z]{0,2})" />
<add input="{QUERY_STRING}" pattern="_REQUEST(=|\[|\%[0-9A-Z]{0,2})" />
</conditions>
<action type="Redirect" url="index.php" appendQueryString="false" redirectType="SeeOther" />
</rule>
<rule name="Joomla Search Rule" stopProcessing="true">
<match url="(.*)" ignoreCase="true" />
<conditions logicalGrouping="MatchAll">
<add input="{URL}" pattern="^/search.php" ignoreCase="true" />
</conditions>
<action type="Rewrite" url="/index.php?option=com_content&view=article&id=4" />
</rule>
<rule name="Joomla Main Rewrite Rule" stopProcessing="true">
<match url="(.*)" ignoreCase="true" />
<conditions logicalGrouping="MatchAll">
<add input="{URL}" pattern="(/[^.]*|\.(php|html?|feed|pdf|raw))$" />
<add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" />
<add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" />
</conditions>
<action type="Rewrite" url="index.php/" />
</rule>
</rules>
</rewrite>
<caching>
<profiles>
<add extension=".php" policy="DisableCache" kernelCachePolicy="DisableCache" />
</profiles>
</caching>
</system.webServer>
</configuration>

Re: Url not working after migration.

Posted: Tue Jul 23, 2013 3:29 pm
by Per Yngve Berg
The file is distributed as webconfig.txt. you have to rename it to web.config.

Re: Url not working after migration.

Posted: Tue Jul 23, 2013 3:37 pm
by andrewsmd87
This was a migration. And on the old server the web.config didn't have this in it. I think filters were set up to use the .htaccess file on the old server.

Re: Url not working after migration.

Posted: Tue Jul 23, 2013 4:09 pm
by Per Yngve Berg
If there is a .htaccess file, it was hosted on an Apache server.