- zlpd2011-06-17论坛元老240
转成IIS可用的 Rewrite httpd.ini 不胜感激....
下面是代码- #- # Apache/PHP/Drupal settings:
- #
- - # Protect files and directories from prying eyes.
- - Order allow,deny
- - - # Don't show directory listings for URLs which map to a directory.
- Options -Indexes
- - # Follow symbolic links in this directory.
- Options +FollowSymLinks
- - # Make Drupal handle any 404 errors.
- ErrorDocument 404 http://www.zhe2.com/forum.php?mod=viewthread&tid=888888888888888888888888888888
- - # Force simple error message for requests for non-existent favicon.ico.
- - # There is no end quote below, for compatibility with Apache 1.3.
- ErrorDocument 404 "The requested file favicon.ico was not found.
- - - # Set the default handler.
- DirectoryIndex index.php index.htm index.html
- - # Override PHP settings. More in sites/default/settings.php
- # but the following cannot be changed at runtime.
- - # PHP 4, Apache 1.
- *
- php_value magic_quotes_gpc 0
- php_value register_globals 0
- php_value session.auto_start 0
- php_value mbstring.http_input pass
- php_value mbstring.http_output pass
- php_value mbstring.encoding_translation 0
- *
- - # PHP 4, Apache 2.
- *
- php_value magic_quotes_gpc 0
- php_value register_globals 0
- php_value session.auto_start 0
- php_value mbstring.http_input pass
- php_value mbstring.http_output pass
- php_value mbstring.encoding_translation 0
- *
- - # PHP 5, Apache 1 and 2.
- *
- php_value magic_quotes_gpc 0
- php_value register_globals 0
- php_value session.auto_start 0
- php_value mbstring.http_input pass
- php_value mbstring.http_output pass
- php_value mbstring.encoding_translation 0
- *
- - # Requires mod_expires to be enabled.
- *
- # Enable expirations.
- ExpiresActive On
- - # Cache all files for 2 weeks after access (A).
- ExpiresDefault A1209600
- - # Do not cache dynamically generated pages.
- ExpiresByType text/html A1
- *
- - # Various rewrite rules.
- *
- RewriteEngine on
- - # If your site can be accessed both with and without the 'www.' prefix, you
- # can use one of the following settings to redirect users to your preferred
- # URL, either WITH or WITHOUT the 'www.' prefix. Choose ONLY one option:
- #
- # To redirect all users to access the site WITH the 'www.' prefix,
- # (http://example.com/... will be redirected to http://www.example.com/...)
- # adapt and uncomment the following:
- # RewriteCond %{HTTP_HOST} ^example\.com$
- # RewriteRule ^(.*)$ http://www.example.com/$1 [L,R=301]
- #
- # To redirect all users to access the site WITHOUT the 'www.' prefix,
- # (http://www.example.com/... will be redirected to http://example.com/...)
- # uncomment and adapt the following:
- # RewriteCond %{HTTP_HOST} ^www\.example\.com$
- # RewriteRule ^(.*)$ http://example.com/$1 [L,R=301]
- - # Modify the RewriteBase if you are using Drupal in a subdirectory or in a
- # VirtualDocumentRoot and the rewrite rules are not working properly.
- # For example if your site is at http://example.com/drupal uncomment and
- # modify the following line:
- # RewriteBase /drupal
- #
- # If your site is running in a VirtualDocumentRoot at http://example.com/,
- # uncomment the following line:
- # RewriteBase /
- - # Rewrite URLs of the form 'x' to the form 'index.php?q=x'.
- # 域名修改后的转向
- RewriteCond %{HTTP_HOST} ^zhe2.com$
- RewriteRule ^(.*)$ http://www.zhe2.com/$1
- #DZx Rewrite 系统规则请勿修改
- RewriteCond %{QUERY_STRING} ^(.*)$
- RewriteRule ^topic-(.+)\.html$ portal.php?mod=topic&topic=$1&%1
- RewriteCond %{QUERY_STRING} ^(.*)$
- RewriteRule ^article-([0-9]+)-([0-9]+)\.html$ portal.php?mod=view&aid=$1&page=$2&%1
- RewriteCond %{QUERY_STRING} ^(.*)$
- RewriteRule ^forum-(\w+)-([0-9]+)\.html$ forum.php?mod=forumdisplay&fid=$1&page=$2&%1
- RewriteCond %{QUERY_STRING} ^(.*)$
- RewriteRule ^thread-([0-9]+)-([0-9]+)-([0-9]+)\.html$ forum.php?mod=viewthread&tid=$1&extra=page\%3D$3&page=$2&%1
- RewriteCond %{QUERY_STRING} ^(.*)$
- RewriteRule ^group-([0-9]+)-([0-9]+)\.html$ forum.php?mod=group&fid=$1&page=$2&%1
- RewriteCond %{QUERY_STRING} ^(.*)$
- RewriteRule ^space-(username|uid)-(.+)\.html$ home.php?mod=space&$1=$2&%1
- RewriteCond %{QUERY_STRING} ^(.*)$
- RewriteRule ^([a-z]+)-(.+)\.html$ $1.php?rewrite=$2&%1
- - #页面地址重写
- RewriteRule ^item-(.*) jump.php?id=$1
- #RewriteRule ^so-(.)-(.)-(.)-(.)-(.)-(.)-(.)-(.)-(.)-(.) so.php?q=$1&page=$2&sort=$3&style=$4&start_price=$5&end_price=$6&start_credit=$7&area=$8&mallItem=$9&auarantee=
- RewriteRule ^so so.php
- #RewriteRule ^zhekou-check-(.*) zhekou.php?action=check&q=$1
- RewriteRule ^zhekou zhekou.php
- - - *
- - # $Id: .htaccess,v 1.90.2.3 2008/12/10 20:04:08 goba Exp $
- 复制代码