New Zenner
- Join Date:
- May 2005
- Posts:
- 23
- Plugin Contributions:
- 0
Ultimate SEO URL's with Isapi ReWrite for IIS6
If you manage your own server this setup is for you. On a shared hosting account, you will need to contact your provider for the setup of the Isapi_ReWrite filter.
How do we do it?
- Visit www.isapirewrite.com and buy the filter. (You can try it free for 30 days)
- Install the Isapi filter. Follow instructions to a T. Correct permissions must be set for IIS_WPG group otherwise you will see errors. See install documentation.
- Setup the httpd.ini file. We do not use htaccess files, instead we will use httpd.ini files which contain the ReWrite rules. The httpd.ini file must be created in the ROOT of your site.
- Insert ReWrite rules. The converted rules are as follows: (insert into the http.ini file)
# From Ultimate SEO URLs
RewriteRule .*-p-(.*)\.html(?:\?(.*))? index.php\?main_page=product_info&products_id=$1?2&$2: [I,L]
RewriteRule .*-c-(.*)\.html(?:\?(.*))? index.php\?main_page=index&cPath=$1?2&$2: [I,L]
RewriteRule .*-m-([0-9]+)\.html(?:\?(.*))? index.php\?main_page=index&manufacturers_id=$1?2&$2: [I,L]
RewriteRule .*-pi-([0-9]+)\.html(?:\?(.*))? index.php\?main_page=popup_image&pID=$1?2&$2: [I,L]
RewriteRule .*-pr-([0-9]+)\.html(?:\?(.*))? index.php\?main_page=product_reviews&products_id=$1?2&$2: [I,L]
RewriteRule .*-pri-([0-9]+)\.html(?:\?(.*))? index.php\?main_page=product_reviews_info&products_id=$1?2&$2: [I,L]
# For Open Operations Info Manager
RewriteRule .*-i-([0-9]+)\.html(?:\?(.*))? index.php\?main_page=info_manager&pages_id=$1?2&$2: [I,L]
# For dreamscape's News & Articles Manager
RewriteRule news/?(?:\?(.*))? index.php\?main_page=news?1&$1: [I,L]
RewriteRule news/rss\.xml(?:\?(.*))? index.php\?main_page=news_rss?1&$1: [I,L]
RewriteRule news/archive/?(?:\?(.*))? index.php\?main_page=news_archive?1&$1: [I,L]
RewriteRule news/([0-9]{4})-([0-9]{2})-([0-9]{2})\.html(?:\?(.*))? index.php\?main_page=news&date=$1-$2-$3?4&$4: [I,L]
RewriteRule news/archive/([0-9]{4})-([0-9]{2})\.html(?:\?(.*))? index.php\?main_page=news_archive&date=$1-$2?3&$3: [I,L]
RewriteRule news/.*-a-([0-9]+)-comments\.html(?:\?(.*))? /index.php?main_page=news_comments&article_id=$1?2&$2: [I,L]
RewriteRule news/.*-a-([0-9]+)\.html(?:\?(.*))? index.php\?main_page=news_article&article_id=$1?2&$2: [I,L]
# All other pages
# Don't rewrite real files or directories
# There is no way to convert these conditions in the current ISAPI_Rewrite version:
# RewriteCond %{REQUEST_FILENAME} !-f [NC]
# RewriteCond %{REQUEST_FILENAME} !-d
# RewriteRule ^(.*).html /index.php?main_page=$1&%{QUERY_STRING} [L]
# Only rule could be converted to:
RewriteRule (.*)\.html(?:\?(.*))? index.php\?main_page=$1?2&$2: [I,L]
UriMatchPrefix
UriFormatPrefix
- Install the Ultimate SEO Module, enable and you should be set.
If you have problems, DOUBLE CHECK THE INSTALLATION DOCUMENTATION. If you do not set the proper permission on the required directories you will encounter problems with the filter.
There was an attached note from the creators of the Isapi_ReWrite filter for IIS that were rules that could not be converted to the isapi filter format. No issues as of yet.
A big thanks to Blindside who pointed out the Isapi_ReWrite filter for IIS. That spawned the process of working on finding a SEO URL option for IIS users.
Thank you to the chinese ZenCart community who started the original thread on converting the code to Isapi format.
And lastly, I want to thank Lexey of Helicon Tech who provided the latest rule conversion from the Mod_ReWrite to Isapi_ReWrite. Without his prompt response in rewriting the ruleset we would still be fumbling around for a solution.
See his reponse to my initial question on the Helicon Tech forums here
I hope this provides you with as much excitement as it has me! A solution at last! Cheers,
Bjorn