Can anyone tell me how to redirect from example.com/sub to sub.example.com by .htaccess by remaining query string as it is.
e.g: redirect
example.com/sub/details.php?id=01
to
sub.example.com/details.php?id=01
Thanks
| SitePoint Sponsor |
Can anyone tell me how to redirect from example.com/sub to sub.example.com by .htaccess by remaining query string as it is.
e.g: redirect
example.com/sub/details.php?id=01
to
sub.example.com/details.php?id=01
Thanks
Do Good Have Good!
^(.*?)/(.*?)/(.*?)$ $2.$1/$3
Bookmarks