我正在使用Cheyenne v0.9并希望提供静态HTML文件text/html,但我不希望URL包含.html扩展名.有没有办法在不使用CGI或其他动态处理器的情况下执行此操作?
例如:
/path/to/example.org/web-root/about.html
Run Code Online (Sandbox Code Playgroud)
使用以下方式联系:
http://example.org/about
Run Code Online (Sandbox Code Playgroud)
Apache等效的'ReWrite'类似于:
RewriteCond %{REQUEST_FILENAME}.html -f
RewriteRule !.*\.html$ %{REQUEST_FILENAME}.html [L]
Run Code Online (Sandbox Code Playgroud)