看板 Web_Design 關於我們 聯絡資訊
我把網站的所有404通通轉去404.html 但是現在發生了連sitemap都被轉走 現在Google抓不到我的sitemap 想問如果設定404一律轉址的話 如何設定例外? -- ◢◣ ◢◣ ◎每月29日天使節 \(≧▽≦)/ ◤◥ ◎當天呼叫平時就保持聯絡的小天使 ◎點歌給小天使並發表於AngelPray████▆ ◎小天使就會下P幣雨喔 ( ̄▽ ̄)> " \|/ \|/ \|/ \|/ \|/ \|/ \|/ =█◣`█◣=█◣"█◣`█◣"█◣"█◣ ︴ -- ※ 發信站: 批踢踢實業坊(ptt.cc), 來自: 111.82.33.143 ※ 文章網址: https://www.ptt.cc/bbs/Web_Design/M.1492737525.A.B0D.html
imhaha: sitemap也404?04/21 18:46
haidai: 對啊,感覺不是html或是圖檔就會被轉走04/21 19:03
haidai: 之前測試OK的sitemap更新之後也404了 04/21 19:03
Hevak: 你自己怎麼寫也沒貼是要怎麼幫你debug....這不是靠感覺的 04/23 12:01
抱歉,我以為大家基本上都用同一段code <files .htaccess> order allow,deny deny from all </files> # use PHP4 as default #AddHandler application/x-httpd-php4 .php <IfModule mod_rewrite.c> RewriteEngine On ErrorDocument 404 /404.html </IfModule> 我是這樣寫
AndCycle: deny from all ... 04/25 19:13
AndCycle: 不對, 你這個要看 apache log 啊, 你要看他為什麼拒絕 04/25 19:14
AndCycle: 而且你有 ErrorDocument , 不需要用 rewrite 04/25 19:16
AndCycle: RewriteEngine 我去查參數只有 on/off, 你這哪抄來的... 04/25 19:22
我忘記分行 If前面是本來就有的我沒去更改 後面 <IfModule 開始是這邊找的 http://www.vixual.net/blog/archives/247 ※ 編輯: haidai (125.230.74.154), 04/25/2017 20:38:54