Results 1 to 4 of 4
  1. #1
    Join Date
    Jun 2010
    Posts
    10
    Plugin Contributions
    0

    Default help url rewrite in the IIS7.0?

    Bad luck my host is IIS7 ,so can't using .htaccess,
    the Hosting providers told i have to use the web.config to rewrite urls,
    this the host's web.config test Rule:
    Code:
    <system.webServer> 
    <rewrite> 
    <rules> 
    <rule name="rule1" stopProcessing="true"> 
    <match url="^article/([0-9]+)/([_0-9a-z-]+)" /> 
    <action type="Rewrite" url="article.aspx?id={R:1}&amp;title={R:2}" /> 
    </rule> 
    <rule name="rule2" stopProcessing="true"> 
    <match url="^tags/([0-9]+)" /> 
    <action type="Rewrite" url="tags.php?tags={R:1}" /> 
    </rule> 
    <rule name="rule3" stopProcessing="true"> 
    <match url="test.html" /> 
    <action type="Rewrite" url="test.asp" /> 
    </rule> 
    </rules> 
    </rewrite> 
    </system.webServer>
    this my store's web.config:
    Code:
    <?xml version="1.0" encoding="UTF-8"?>
    <configuration>
    <system.webServer>
    <rewrite>
    <rules>
    <rule name="Digimartz Rule 1" stopProcessing="true">
    <match url="^print_page_p(.*)$" ignoreCase="false" />
    <action type="Rewrite" url="index.php?main_page=print_page&amp;products_id={R:1}" appendQueryString="false" />
    </rule>
    <rule name="Digimartz Rule 2" stopProcessing="true">
    <match url="^(.*)-p-(.*).html$" ignoreCase="false" />
    <action type="Rewrite" url="index.php?main_page=product_info&amp;products_id={R:2}" appendQueryString="false" />
    </rule>
    <rule name="Digimartz Rule 3" stopProcessing="true">
    <match url="^(.*)-c-(.*).html$" ignoreCase="false" />
    <action type="Rewrite" url="index.php?main_page=index&amp;cPath={R:2}" appendQueryString="false" />
    </rule>
    <rule name="Digimartz Rule 4" stopProcessing="true">
    <match url="^(.*)_c([0-9]+)/([-\w]*)$" ignoreCase="false" />
    <action type="Rewrite" url="index.php?main_page=index&amp;cPath={R:2}&amp;display={R:3}" appendQueryString="false" />
    </rule>
    <rule name="Digimartz Rule 5" stopProcessing="true">
    <match url="^(.*)_c([0-9]+)/([-\w]*)/([-\w]*).html$" ignoreCase="false" />
    <action type="Rewrite" url="index.php?main_page=index&amp;cPath={R:2}&amp;display={R:3}" appendQueryString="false" />
    </rule>
    <rule name="Digimartz Rule 6" stopProcessing="true">
    <match url="^(.*)-m-([0-9]+).html$" ignoreCase="false" />
    <action type="Rewrite" url="index.php?main_page=index&amp;manufacturers_id={R:2}" appendQueryString="false" />
    </rule>
    <rule name="Digimartz Rule 7" stopProcessing="true">
    <match url="^(.*)-pi-([0-9]+).html$" ignoreCase="false" />
    <action type="Rewrite" url="index.php?main_page=popup_image&amp;pID={R:2}" appendQueryString="false" />
    </rule>
    <rule name="Digimartz Rule 8" stopProcessing="true">
    <match url="^(.*)-pr-([0-9]+).html$" ignoreCase="false" />
    <action type="Rewrite" url="index.php?main_page=product_reviews&amp;products_id={R:2}" appendQueryString="false" />
    </rule>
    <rule name="Digimartz Rule 9" stopProcessing="true">
    <match url="^(.*)-pri-([0-9]+).html$" ignoreCase="false" />
    <action type="Rewrite" url="index.php?main_page=product_reviews_info&amp;products_id={R:2}" appendQueryString="false" />
    </rule>
    <rule name="Digimartz Rule 10" stopProcessing="true">
    <match url="^producttags/([-\w]+)/$" ignoreCase="false" />
    <action type="Rewrite" url="index.php?main_page=producttags&amp;letter={R:1}" appendQueryString="false" />
    </rule>
    <rule name="Digimartz Rule 11" stopProcessing="true">
    <match url="^producttags/([\w])/([0-9]+).html$" ignoreCase="false" />
    <action type="Rewrite" url="index.php?main_page=producttags&amp;letter={R:1}&amp;page={R:2}" appendQueryString="false" />
    </rule>
    <rule name="Digimartz Rule 12" stopProcessing="true">
    <match url="^wishlist/$" ignoreCase="false" />
    <action type="Rewrite" url="index.php?main_page=wishlist" appendQueryString="false" />
    </rule>
    <rule name="Digimartz Rule 13" stopProcessing="true">
    <match url="^wishlist/([\w])/$" ignoreCase="false" />
    <action type="Rewrite" url="index.php?main_page=wishlist&amp;letter={R:1}" appendQueryString="false" />
    </rule>
    <rule name="Digimartz Rule 14" stopProcessing="true">
    <match url="^wishlist/([\w])/([0-9]+).html$" ignoreCase="false" />
    <action type="Rewrite" url="index.php?main_page=wishlist&amp;letter={R:1}&amp;page={R:2}" appendQueryString="false" />
    </rule>
    <!--# For Open Operations Info Manager-->
    <rule name="Digimartz Rule 15" stopProcessing="true">
    <match url="^(.*)-i-([0-9]+).html$" ignoreCase="false" />
    <action type="Rewrite" url="index.php?main_page=info_manager&amp;pages_id={R:2}" appendQueryString="false" />
    </rule>
    <!--# For dreamscape's News & Articles Manager-->
    <rule name="Digimartz Rule 16" stopProcessing="true">
    <match url="^news/?$" ignoreCase="false" />
    <action type="Rewrite" url="index.php?main_page=news" appendQueryString="false" />
    </rule>
    <rule name="Digimartz Rule 17" stopProcessing="true">
    <match url="^news/rss.xml$" ignoreCase="false" />
    <action type="Rewrite" url="index.php?main_page=news_rss" appendQueryString="false" />
    </rule>
    <rule name="Digimartz Rule 18" stopProcessing="true">
    <match url="^news/archive/?$" ignoreCase="false" />
    <action type="Rewrite" url="index.php?main_page=news_archive" appendQueryString="false" />
    </rule>
    <rule name="Digimartz Rule 19" stopProcessing="true">
    <match url="^news/([0-9]{4})-([0-9]{2})-([0-9]{2}).html$" ignoreCase="false" />
    <action type="Rewrite" url="index.php?main_page=news&amp;date={R:1}-{R:2}-{R:3}" appendQueryString="false" />
    </rule>
    <rule name="Digimartz Rule 20" stopProcessing="true">
    <match url="^news/archive/([0-9]{4})-([0-9]{2}).html$" ignoreCase="false" />
    <action type="Rewrite" url="index.php?main_page=news_archive&amp;date={R:1}-{R:2}" appendQueryString="false" />
    </rule>
    <rule name="Digimartz Rule 21" stopProcessing="true">
    <match url="^news/(.*)-a-([0-9]+)-comments.html$" ignoreCase="false" />
    <action type="Rewrite" url="index.php?main_page=news_comments&amp;article_id={R:2}" appendQueryString="false" />
    </rule>
    <rule name="Digimartz Rule 22" stopProcessing="true">
    <match url="^news/(.*)-a-([0-9]+).html$" ignoreCase="false" />
    <action type="Rewrite" url="index.php?main_page=news_article&amp;article_id={R:2}" appendQueryString="false" />
    </rule>
    <rule name="Digimartz Rule 25" stopProcessing="true">
    <match url="^(.*)_c([0-9]+)/([-\w]*)/([-\w]*).html$" ignoreCase="false" />
    <action type="Rewrite" url="index.php?main_page=index&amp;cPath={R:2}&amp;sort=20a&amp;page={R:3}" appendQueryString="false" />
    </rule>
    <rule name="Digimartz Rule 23" stopProcessing="true">
    <match url="^(.*).html$" ignoreCase="false" />
    <conditions>
    <!--# All other pages-->
    <!--# Don't rewrite real files or directories-->
    <add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" />
    <add input="{REQUEST_FILENAME}" matchType="IsDirectory" ignoreCase="false" negate="true" />
    </conditions>
    <action type="Rewrite" url="index.php?main_page={R:1}" appendQueryString="false" />
    </rule>
    </rules>
    </rewrite>
    <httpErrors>
    <remove statusCode="404" subStatusCode="-1" />
    <error statusCode="404" prefixLanguageFilePath="" path="/index.php" responseMode="ExecuteURL" />
    </httpErrors>
    </system.webServer>
    <system.web> 
    <customErrors mode="Off" />
    <globalization requestEncoding="utf-8" responseEncoding="utf-8" fileEncoding="utf-8" /> 
    </system.web> 
    </configuration>
    the most urls can Static, but it have a problem, when i hit the next page the also show the page1.i know one Rule is wrong , but i don't know how to write ,somebody can help me ?
    my store :www.digimartz.net

    the error url:http://www.digimartz.net/index.php?m...ort=20a&page=2

    take a look ,help me please!!

  2. #2
    Join Date
    Jun 2005
    Location
    Cumbria, UK
    Posts
    10,267
    Plugin Contributions
    3

    Default Re: url rewrite in the IIS7.0

    You do not need to do URL rewriting anymore.

    The search engines PREFER that dynamic urls are maintained.
    20 years a Zencart User

  3. #3
    Join Date
    Jun 2010
    Posts
    10
    Plugin Contributions
    0

    Default Re: url rewrite in the IIS7.0

    thanks!
    but why do not we try to solve it ?

  4. #4
    Join Date
    Jun 2005
    Location
    Cumbria, UK
    Posts
    10,267
    Plugin Contributions
    3

    Default Re: url rewrite in the IIS7.0

    Quote Originally Posted by jjyypi View Post
    thanks!
    but why do not we try to solve it ?
    Why try to "fix" something that isn't needed?
    20 years a Zencart User

 

 

Similar Threads

  1. change url / url rewrite?
    By moesoap in forum All Other Contributions/Addons
    Replies: 3
    Last Post: 30 Jun 2010, 02:13 PM
  2. help,how to rewrite the meta tag?
    By zz89059262 in forum Templates, Stylesheets, Page Layout
    Replies: 0
    Last Post: 10 Dec 2009, 05:11 AM
  3. How to change .htaccess to rewrite the url? - Hard
    By musicpxg in forum General Questions
    Replies: 0
    Last Post: 30 Jul 2009, 09:05 AM
  4. url rewrite ???
    By dannyd in forum Templates, Stylesheets, Page Layout
    Replies: 1
    Last Post: 18 Feb 2007, 10:41 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg