https://duckduckgo.com/?q=apache+exclude+html+extension&t=raspberrypi&ia=web
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
http://httpd.apache.org/docs/2.2/content-negotiation.html#multiviews
'Linux LIFE > 라즈베리파이' 카테고리의 다른 글
맥OS에서 라즈베리파이 설치하는 방법 2가지 (0) | 2020.08.12 |
---|---|
맥에서 xrdp를 사용하여, 라즈베리파이에 원격 접속 하는 방법 (0) | 2020.08.12 |