.htaccess wildcard redirect from parked domain? -
i have 2 domains pointing site, example; http://some-long-domain.co.uk , http://short.co - want able share urls http://short.co/x/ic5rai, while redirecting traffic www. version of main domain, , keeping path on url.
to complicate matters, don't want touch versions of domain subdomain use development (local. , staging.).
e.g.;
- http://short.co/x/ic5rai -> http://www.some-long-domain.co.uk/x/ic5rai
- http://www.short.co/x/ic5rai -> http://www.some-long-domain.co.uk/x/ic5rai
- http://some-long-domain.co.uk/x/ic5rai -> http://www.some-long-domain.co.uk/x/ic5rai
- http://local.some-long-domain.co.uk/x/ic5rai -> http://local.some-long-domain.co.uk/x/ic5rai
- http://staging.some-long-domain.co.uk/x/ic5rai -> http://staging.some-long-domain.co.uk/x/ic5rai
current re-write rules following, , work latter point (local/staging), not else. doing wrong?
rewritecond %{http_host} !^www.some-long-domain.co.uk$ [nc] rewritecond %{http_host} !^local.some-long-domain.co.uk$ [nc] rewritecond %{http_host} !^staging.some-long-domain.co.uk$ [nc] rewritecond %{http_host} ^short.co$ [nc] rewritecond %{http_host} ^www.short.co$ [nc] rewriterule ^(.*)$ http://www.some-long-domain.co.uk/$1 [r=301,qsa,l]
Comments
Post a Comment