5 Website Development Tips To Boost Your Business Growth Exponentially

Joomla in IIS Sub-folder web.config rewrite  (godaddy.com Servers)


I have spent the worst 48 hours of my life trying to make a simple solution work with a clients go-daddy Windows hosting solution

Godaddy doesn’t allow editing root directory file permissions so Joomla should be installed in a sub folder.  and permissions on that sub folder can be given write access.  You can go in and reset the other permissions separately if needed.



Now you would need a redirect and rewrite in web.config  so ill paste it below..  

This has worked for me:   (but of course keep in mind that linux servers are always better for joomla)


( you should be able to copy n paste / change folder “root”  to your folder,  and change Domain “www.gulftires.com” to your domain


<?xml version="1.0" encoding="UTF-8"?>

# Redirect all domain.com to www.domin.com

<rule name="Redirect to www subdomain">

<match url=".*" />

<conditions logicalGrouping="MatchAny">
 <add input="{HTTP_HOST}" pattern="^(www\.)(.*)$" negate="true" />

<action type="Redirect" url="http://www.{HTTP_HOST}/{R:0}" redirectType="Permanent"/>          


# Add Joomla rewrite scripts                        

  <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" />
<action type="CustomResponse" url="index.php" statusCode="403" statusReason="Forbidden"

statusDescription="Forbidden" />

<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" />
<action type="Rewrite" url="index.php" />

#  This Scripts bypasses the rewriting for administrator page ( makes life simpler)

<rule name="check is admin page" stopProcessing="true">
<match url="^root/administrator" ignoreCase="true" />
<action type="None" />

#  Redirects if someone happens to directly go to this sub folder

<rule name="Redirect if root" stopProcessing="true">
<match url="root/(.*)$" />
<action type="Redirect" url="{R:1}" />

#  This is the rewrite engine here,   this will make domain read to the /root folder
<rule name="Rewrite to sub folder">
<match url="^.*$" />
<add input="{HTTP_HOST}" pattern="^(www\.)gulftires\.com$" />
<action type="Rewrite" url="root/{R:0}" />
</configuration >

Published on: Mar 03, 2021

Categories: Web Development

    No Comments yet! Be the first one to write.

    Leave a Reply

    Your email address will not be published. Required fields are marked *