UtkarshKulshrestha.com - A Complete Web Solution

  • Call: +(91) 823 373 8330
    Or leave a call back request and we will call you back
    GMT +5.5 Open: 9am-10pm, Sun/Sat
  • QR-Code

Opencart Seo Friendly URL’s on (IIS 7 Server)

We all know how to rewrite urls for opencarton Linux servers. But if you are one of those who have opencart installed on windows servers then you must have faced issues with URL rewriting.

So here we go, just follow this simple steps and your opencart application can have SEO friendly URLs on IIS server too.

Log in to the admin panel -> go to SystemSettings. Click on Edit -> go to server tab and click yes for SEO friendly urls.

seo-admin   seo-urls


Well this is the easy step.

Now a bit of coding stuff.

Create a web.config file, so remember that what .htaccess file is to Apache server, web.config is to IIS server.

web.config code start

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

<rule name=”Imported Rule 1? stopProcessing=”true”>
<match url=”^(.*)$” ignoreCase=”false” />
<add input=”{HTTP_HOST}” pattern=”^yourdomain\.com$” />
<action type=”Redirect” redirectType=”Permanent” url=”http://www.yourdomain.com/{R:1}” />
<rule name=”Imported Rule 2? stopProcessing=”true”>
<match url=”^(.*)$” ignoreCase=”false” />
<add input=”{REQUEST_FILENAME}” matchType=”IsFile” ignoreCase=”false” negate=”true” />
<add input=”{REQUEST_FILENAME}” matchType=”IsDirectory” ignoreCase=”false” negate=”true” />
<add input=”{URL}” pattern=”^/favicon.ico$” ignoreCase=”false” negate=”true” />
<action type=”Rewrite” url=”index.php?_route_={R:1}” appendQueryString=”true” />

web.config code end

Just copy paste the above code in your web.config file and upload it on your server. Voila! SEO URL enabled.

Now for those nerds who need a bit of technical explanation.

The first rewrite rule will helps in redirecting the website from naked domain to www.domain name. This is very good for Google SEO.

The second re write rule will simply remove the index.php?_route_= and put the SEO key word of the category that you just entered.

So enjoy Opencart and have a good day!

Post Comments & Suggestions

Comments are closed.