Enabling Search Engine Friendly Links with Url Re-write in Galaxie Blog
Apr 26 |
Follow the steps below to enable search engine-friendly URLs in the Galaxie blog.
- If you're using IIS, the following rule should be copied and pasted into the web.config in the root directory on your web server. The URL redirection rule is between the rewrite tags below. It essentially matches all strings with 'index.cfm', and removes this string. Additionally, it sets a permanent redirect that the search engine uses when crawling your page. If you're using a different web server, see the links at the bottom of this article or consult with your server administrator.
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<system.webServer>
<directoryBrowse enabled="false" />
<urlCompression doStaticCompression="true" doDynamicCompression="true" />
<rewrite>
<rules>
<rule name="GregorysBlog" stopProcessing="true">
<match url="(.*)index.cfm" />
<conditions logicalGrouping="MatchAll">
<add input="{SCRIPT_FILENAME}" matchType="IsFile" negate="true" />
<add input="{QUERY_STRING}" pattern=".+" ignoreCase="false" negate="true" />
</conditions>
<action type="Redirect" url="{R:1}" appendQueryString="true" redirectType="Permanent" />
</rule>
</rules>
</rewrite>
<security>
<requestFiltering>
<fileExtensions>
<add fileExtension=".pl" allowed="false" />
</fileExtensions>
</requestFiltering>
</security>
<httpErrors errorMode="Detailed" />
<staticContent>
<remove fileExtension=".woff2" />
<mimeMap fileExtension=".woff2" mimeType="font/woff2" />
<remove fileExtension=".webp" />
<mimeMap fileExtension=".webp" mimeType="image/webp" />
</staticContent>
</system.webServer>
</configuration>
- Log into the Galaxie Blog Administrator and click on the Blog options icon.
- Check the Server Rewrite Rule in place checkbox.
- Click on the submit button at the bottom of the page.
That's it! Your blog should now be using search-friendly URLs.
Credits:
- I especially want to thank Caleb C. from Hostek for helping me understand the IIS rule. The Hostek folks have been nothing but outstanding in their service and support!
Further Reading:
Tags
Search Friendly URL's, Search Friendly URL'sThis entry was posted on April 26, 2022 at 7:24 PM and has received 1844 views.