ドメイン www.example.com とサブドメイン test.example.com があります。test.example.com を呼び出すとき、test.example.com の URL を変更せずに、これを www.example.com/search/property/test_state にリダイレクトする必要があります。したがって、URL は test.example.com のみのようになります。
私は .htaccess コードでこれを行いました。
RewriteCond %{HTTP_HOST} !^www\.example\.com
RewriteCond %{HTTP_HOST} !^webmail\.example\.com
RewriteCond %{HTTP_HOST} !^m\.example\.com
RewriteCond %{HTTP_HOST} ([^.]+)\.example\.com
RewriteCond %{REQUEST_URI} !^/index\.php$
RewriteRule ^$ /search/property/%1_state [P]
この後、test.example.com/content/sell_your_home のようなサブドメインから URL にアクセスすると、URL がメイン ドメインに変更されません。現在、これにアクセスすると、メイン ドメインにリダイレクトされます。何か案は?