我htaccess的代碼是國防部重寫 - 澄清
RewriteEngine on
Options +FollowSymlinks -MultiViews
# URL REWRITE
RewriteRule ^domain-name/?$ domain.php [L]
RewriteRule ^domain-name/registration/?$ domain-registration.php [L]
RewriteRule ^domain-name/price/?$ domain-price.php [L]
RewriteRule ^domain-name/security/?$ domain-security.php [L]
RewriteRule ^domain-name/features/?$ domain-features.php [L]
RewriteRule ^domain-name/faq/?$ domain-faq.php [L]
RewriteRule ^domain-name/provider/?$ domain-why-choose-us.php [L]
RewriteRule ^domain-name/free/?$ domain-free.php [L]
RewriteRule ^domain-name/transfer/?$ domain-transfer.php [L]
# 301
RewriteCond %{HTTP_HOST} ^www\.domain\.com$ [NC]
RewriteRule ^(.*)$ http://domain.com/$1 [R=301,L]
我的問題是,如果我進入http://domain.com/domain-name/free 這是工作的罰款。但
http://www.domain.com/domain-name/free 是去我原來的PHP文件(free.php)
如何解決這個問題?
問題就解決了我正確的代碼是波紋管
RewriteEngine on
Options +FollowSymlinks -MultiViews
# 301
RewriteCond %{HTTP_HOST} ^www\.globaliway\.com$ [NC]
RewriteRule ^(.*)$ http://globaliway.com/$1 [R=301,L]
# URL REWRITE
RewriteRule ^domain-name/?$ domain.php [L]
RewriteRule ^domain-name/registration/?$ domain-registration.php [L]
RewriteRule ^domain-name/price/?$ domain-price.php [L]
請儘量明確你想要做什麼,以及在哪種計算機語言。這是不可理解的,對不起。 – 2011-04-21 20:22:24