0
這些htaccess的規則,我發瘋,我試過的例子和發電機的負荷,並得到knowhere ...的.htaccess重寫細節
我的htaccess如下所示
Options +FollowSymLinks
DirectoryIndex index.php
RewriteEngine On
RewriteBase/
RewriteCond %{HTTP_HOST} ^www.domain.com [NC]
RewriteRule ^(.*)$ http://domain.co.uk/$1 [L,R=301]
RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /index\.php\ HTTP/
RewriteRule ^index\.php$ http://www.domain.com/ [R=301,L]
RewriteRule ^location/([^/]*)\.html$ /location.php?location=$1 [R=301,L]
RewriteRule ^([^/]*)\.html$ /search.php?searching=yes&s=$1 [R=301,L]
我試圖讓
http://www.domain.com
to http://domain.com (works)
http://domain.com/index.php
to http://domain.com (works)
全部重寫PHP擴展到html即
http://domain.com/location.php
to http://domain.con/location.html (doesnt work)
http://domain.com/about.php
to http://domain.con/about.html (doesnt work)
http://domain.com/support.php
to http://domain.com/support.html (doesnt work)
改寫以下變量
http://domain.com/location.php?location=bedfordshire
to http://domain.com/location/bedfordshire.html (doesnt work)
http://domain.com/search.php?searching=yes&s=langster&pmin=&daf=&search=&pmax=&dab=
to http://domain.com/langster.html (doesnt work)
喜歡的index.php,location.php和search.php中有些有頁面和其他變量,但我真的不希望進入蠕蟲了可以呢。
。在這些工作(謝謝)......但需要實際的文件在那裏,有沒有辦法做到這一點? – user1639745
@ user1639745用新的部分更新了答案。看看 –
這是一個沒有結束的循環......它只是在一個圓圈內繼續重定向:) – user1639745