我有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