i am going to redirect my domain to specific path.
thing that i want is
admin.example.com to admin.example.com/admin
partner.example.com to partner.example.com/partner
I need this two function in one .htaccess file. Thanks.
i am going to redirect my domain to specific path.
thing that i want is
admin.example.com to admin.example.com/admin
partner.example.com to partner.example.com/partner
I need this two function in one .htaccess file. Thanks.
Assuming
admin.example.com
andpartner.example.com
point to the same place on the filesystem, then in the document root try the following (mod_rewrite directives) at the top of your.htaccess
file:This will redirect just the two specific URLs as stated in your question, namely:
http://admin.example.com/
tohttp://admin.example.com/admin
http://partner.example.com/
tohttp://partner.example.com/partner
Change the
302
(temporary) redirect to301
(permanent) when you are sure it is working OK - if this is to be a permanent redirect. (302s are easier for testing, since they won't be cached by the browser.)