I need to redirect following url
admin.example.us
to
myadmin.example.us
I have tried different examples using RewriteBase
, RewriteRule
, RewriteCond
. Nothing quite fits my case and my regex seems to fail.
Thank you for your help
You can use this .htaccess
:
RewriteEngine on
RewriteCond %{HTTP_HOST} ^admin\. [NC]
RewriteRule ^ http://myadmin.example.us%{REQUEST_URI} [NE,L,R=301]
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.