我有PHP oscommerce网站,其中我已经使用htaccess的URL重写来隐藏文件名,现在我面临的问题是,我的本地服务器无法复制htaccess,因为它应该是这是在现场工作完美..本地和现场服务器htaccess规则不同
可以有人建议可能是什么原因?
EDITED
下面是我使用htaccess的重写规则,我已经取代了我原来的站点, “MYDOMAIN” 为安全起见名称:
RewriteEngine On
RewriteCond %{HTTP_HOST} ^mydomain.com [NC]
RewriteRule ^(.*)$ http://www.mydomain.com/$1 [L,R=301]
#INDEX PAGE
#----------
RewriteRule http://www.mydomain.com/index\.html http://www.mydomain.com/ [R]
RewriteRule http://www.mydomain.com/index\.php http://www.mydomain.com/ [R]
RewriteRule ^index.html index.php [NC]
#STATIC PAGES
#------------
RewriteRule ^about-us.html information.php?info_id=1 [NC]
RewriteRule ^faqs.html information.php?info_id=8 [NC]
RewriteRule ^contact-us.html contact_us.php?info_id=9 [NC]
RewriteRule ^terms-and-conditions.html information.php?info_id=10 [NC]
RewriteRule ^privacy-policy.html information.php?info_id=3 [NC]
#RewriteRule ^we-design-your-banner-free.html information.php?info_id=11 [NC]
RewriteRule ^vinyl-banner-samples.html vinyl_banner_sample.php [NC]
RewriteRule ^art-specifications.html art_specification.php [NC]
RewriteRule ^sitemap.html sitemap.php [NC]
#checkout - my account pages
#---------------------------
#RewriteRule ^account.html account.php?$1 [NC]
#RewriteRule ^checkout.html checkout.php?$1 [NC]
现在的问题像这样:
我有一个链接:
<a href="/about_us.html" title="About Us" class="footertext_link">About Us</a>
现在,在本地机器上,当我点击这个链接,我浏览到网址
http://192.168.1.55/about_us.html
而应被导航到
http://192.168.1.55/mydomain/about_us.html
预期URL根据可用活的服务器上的域名,但在本地我找不到网页..
请帮忙
在任何情况下都不会向我们显示有问题的htaccess文件。这将需要所有的悬念 – 2010-09-01 09:44:30
你真的只是问第三次你问过的同一个问题吗? – 2010-09-01 11:07:56
有人可以请教@TIM的回复吗? – 2010-09-01 13:13:14