分享

写回答

发帖

[提问] 如何将以下.htaccess改为win主机下的php伪静态?

GoDaddy GoDaddy 1542 人阅读 | 6 人回复

发表于 2010-4-6 20:33:41 | 显示全部楼层 |阅读模式

Options +FollowSymLinks
RewriteEngine On
RewriteBase /

# From Ultimate SEO URLs
RewriteRule ^(.*)-p-(.*).html$ index\.php?main_page=product_info&products_id=$2&%{QUERY_STRING} [L]
RewriteRule ^(.*)-c-(.*).html$ index\.php?main_page=index&cPath=$2&%{QUERY_STRING} [L]
RewriteRule ^(.*)-m-([0-9]+).html$ index\.php?main_page=index&manufacturers_id=$2&%{QUERY_STRING} [L]
RewriteRule ^(.*)-pi-([0-9]+).html$ index\.php?main_page=popup_image&pID=$2&%{QUERY_STRING} [L]
RewriteRule ^(.*)-pr-([0-9]+).html$ index\.php?main_page=product_reviews&products_id=$2&%{QUERY_STRING} [L]
RewriteRule ^(.*)-pri-([0-9]+).html$ index\.php?main_page=product_reviews_info&products_id=$2&%{QUERY_STRING} [L]

# For Open Operations Info Manager
RewriteRule ^(.*)-i-([0-9]+).html$ index\.php?main_page=info_manager&pages_id=$2&%{QUERY_STRING} [L]

# For dreamscape's News & Articles Manager
RewriteRule ^news/?$ index\.php?main_page=news&%{QUERY_STRING} [L]
RewriteRule ^news/rss.xml$ index\.php?main_page=news_rss&%{QUERY_STRING} [L]
RewriteRule ^news/archive/?$ index\.php?main_page=news_archive&%{QUERY_STRING} [L]
RewriteRule ^news/([0-9]{4})-([0-9]{2})-([0-9]{2}).html$ index\.php?main_page=news&date=$1-$2-$3&%{QUERY_STRING} [L]
RewriteRule ^news/archive/([0-9]{4})-([0-9]{2}).html$ index\.php?main_page=news_archive&date=$1-$2&%{QUERY_STRING} [L]
RewriteRule ^news/(.*)-a-([0-9]+)-comments.html$ index\.php?main_page=news_comments&article_id=$2&%{QUERY_STRING} [L]
RewriteRule ^news/(.*)-a-([0-9]+).html$ index\.php?main_page=news_article&article_id=$2&%{QUERY_STRING} [L]

# All other pages
# Don't rewrite real files or directories
RewriteCond %{REQUEST_FILENAME} !-f [NC]
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*).html$ index\.php?main_page=$1&%{QUERY_STRING} [L]
以上是Zen Cart的.htaccess,我用win主机,IIS 7,网上介绍用web.config可以实现php伪静态,怎么做啊?谢谢高手!

回答|共 6 个

mxzjl

发表于 2010-4-6 21:11:20 | 显示全部楼层

是GD主机,有没有现成的可以使用?

mxzjl

发表于 2010-4-7 07:11:27 | 显示全部楼层

没人答复啊?

mxzjl

发表于 2010-4-7 12:37:08 | 显示全部楼层

自己顶

mxzjl

发表于 2010-4-7 19:55:11 | 显示全部楼层

:'(

add.c

发表于 2010-4-8 11:16:11 | 显示全部楼层

it985

发表于 2010-4-8 18:47:28 | 显示全部楼层

这个我也在研究了!
您需要登录后才可以回帖 登录 | 注册

本版积分规则