Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
サーバー上に存在しないファイルをいくつかホストしていますが、Apache エラー ログに「ファイルが存在しません」という行が表示され続けます。
.htaccess を使用して、URI で要求された場合に、ルートの場所 (またはその他の場所) にリダイレクトする必要があるファイルを手動で指定したいと思います。
誰かがそれを行う方法を手伝ってもらえますか?
例:
www.domain.com/non-existent-file.jpgに行くべきですwww.domain.com/
www.domain.com/non-existent-file.jpg
www.domain.com/
それを解決しました:
RewriteRule non-existent-file.jpg http://www.domain.com/ [R=301]
それが最善の解決策であることを願っています!