반응형

https://duckduckgo.com/?q=apache+exclude+html+extension&t=raspberrypi&ia=web

apache exclude html extension at DuckDuckGo

duckduckgo.com


The client can then send out bookmarks in the style mydomain.com/foo rather than mydomain.com/foo.html.

It sounds very simple, and I've used mod_rewrite happily before (say with WordPress or for redirects), but this is proving much harder to crack that I thought. Perhaps I'm missing something really obvious, but I can't find a solution anywhere and I've been at it all day!

이렇게 추가하면 된다

RewriteEngine on
RewriteCond %{DOCUMENT_ROOT}%{REQUEST_FILENAME}.html -f
RewriteRule !.*\.html$ %{REQUEST_FILENAME}.html [L]





또 다른 방법

https://m.blog.naver.com/PostView.nhn?blogId=didim365_&logNo=220315112825&proxyReferer=https%3A%2F%2Fwww.google.com%2F

 


마지막 간단 방법
MultiViews 넣기


https://qastack.kr/superuser/337626/how-is-apache-mapping-files-without-extensions

확장자가없는 Apache 맵핑 파일은 어떻게됩니까?

qastack.kr

http://httpd.apache.org/docs/2.2/content-negotiation.html#multiviews

내용협상 (Content Negotiation) - Apache HTTP Server Version 2.2

Please note This document refers to the 2.2 version of Apache httpd, which is no longer maintained. The active release is documented here. If you have not already upgraded, please follow this link for more information. You may follow this link to go to the

httpd.apache.org

반응형

+ Recent posts