Reputation: 1014
I have basically moved some billing software from domain.co.uk/billing/ to billing.domain.co.uk
I basically need a htaccess rewrite rule to redirect everything
from
domain.co.uk/billing/invoice?=1
to
billing.domain.co.uk/invoice?=1
Is this possible?
Thanks
Upvotes: 0
Views: 49
Reputation: 3947
First you must keep http://domain.co.uk hosted somewhere. Inside it you have the billing folder.
Inside billing folder you have htaccess with this code:
< IfModule mod_rewrite.c >
Options +FollowSymLinks
RewriteEngine On
RewriteRule ^(.*)/invoice?=(.*)$ http://billing.domain.co.uk/invoice?=$2 [R=301,L]
< /IfModule >
Upvotes: 0
Reputation: 72981
You can do so with Redirect
:
Redirect 301 /billing http://billing.billing.domain.co.uk
Upvotes: 2