1
從@anubhava的幫助,我有這個漂亮的RewriteRule工作。如何讓RewriteRule子域不可知?
short.dev redirects to longer.dev
short.com redirects to longer.com
使用此:
RewriteCond %{HTTP_HOST} ^(?:www\.)?short\.(.+)$ [NC]
RewriteRule^http://longer.%1%{REQUEST_URI} [R=301,L]
我現在需要擴展此規則,以使其子域不可知也 - 樣:
www.short.dev redirects to www.longer.dev
www.short.com redirects to www.longer.com
es.short.dev redirects to es.longer.dev
es.short.com redirects to es.longer.com