请帮助在.htaccess文件中实现以下功能
HTPPS://www.examplesite.com/folder/file/amp/
检查URL末尾是否/ amp /出现[AND]
检查/mobile/folder/file.html文件是否存在
重写为htpps://www.examplesite.com/mobile/folder/file.html
希望以下内容有所帮助:
RewriteCond %{REQUEST_URI} "^(.+)/amp/$" RewriteCond "%{DOCUMENT_ROOT}/mobile/$1.html" -f RewriteRule "^(.+)/amp/$" "%{DOCUMENT_ROOT}/mobile/$1.html" [L]
1 回答
希望以下内容有所帮助: