SecFilterEngine Off
DirectorySlash Off
Options -Indexes
ErrorDocument 404 /not-found.php
ErrorDocument 403 /not-found.php
RewriteEngine On
RewriteBase/
RewriteCond %{HTTP_HOST} ^xyz.com.au$ [NC]
RewriteRule ^(.*)$ http://someurl.au/$1 [R=301,L]
# RewriteCond %{QUERY_STRING} ^.+$
# RewriteRule ^$ ? [R=301,L]
RewriteRule ^news_and_events.asp news-and-views? [NC,R=301,L]
RewriteRule ^detailapplication.asp products/applications? [NC,R=301,L]
RewriteRule ^detailproduct.asp products/products? [NC,R=301,L]
RewriteRule ^detailproduct.asp products/products? [NC,R=301,L]
RewriteRule ^products.asp products/products? [NC,R=301,L]
此代碼在服務器上正常工作,但它不在localhost上工作。請有人告訴我必要的改變。在那個網址是我認爲需要在該網址作爲本地主機的變化,我有添加本地主機那裏,但仍然無法正常工作,請告訴我的問題如何在本地主機上運行htaccess重寫代碼
也許你沒有所有的Apache mods加載使用''SecFilterEngine''甚至''ModRewrite''?如果你告訴我們什麼不工作,這將是好的例如。你得到一個''內部服務器錯誤''或只是''RewriteRules''不工作... – ins0
服務器錯誤!錯誤沒有500 –
看我的第一個評論 – ins0