• Welcome to AcornDomains.co.uk, a friendly community for UK domain investors, developers and anyone interested in domain names.

    Whether you're looking to buy or sell domains, learn more about the UK domain market, get feedback on your names, or simply chat with other domainers, you're in the right place. AcornDomains has been bringing together people from across the UK domain industry for many years, from complete beginners to experienced investors.

    Have a look around, join the discussions and, if you haven't already, create a free account and introduce yourself.

url redirecting using htaccess

Status
Not open for further replies.

PaullasPaullas is verified member.

Acorn Moderator
Nominet Member
Nominet Registrar
Hosting Provider
Domain Marketplace
Parking Service
Joined
Jul 13, 2004
Posts
5,928
Reaction score
467
i am looking for a way to redirect urls when a user visits the page using .htaccess

for example

domain1.co.uk
domain2.co.uk
domain3.co.uk

are all parked on domain.co.uk

when a user goes to domain1.co.uk i want to divert them to domain.co.uk/domain1

i used to have this but can not find it so any help much appreciated.
 
sussed it

Options +FollowSymLinks
RewriteEngine on
RewriteCond %{HTTP_HOST} ^(www\.)?domain1.co.uk [NC]
RewriteCond %{HTTP_HOST} !^$
RewriteRule ^(.*) http://www.domain.co.uk/domain1/$1 [L,R=301]
 
just thought i would open an old thread rather create a new one.

Is it possible to create the above using wildcard for a domain/url.

so instead of using the following per domain:

Options +FollowSymLinks
RewriteEngine on
RewriteCond %{HTTP_HOST} ^(www\.)?domain1.co.uk [NC]
RewriteCond %{HTTP_HOST} !^$
RewriteRule ^(.*) http://www.domain.co.uk/domain1/$1 [L,R=301]

have it so it is seens for example tfts.co.uk it will divert to /tfts/
or domain1.co.uk goes to /domain1/
 
Status
Not open for further replies.
Top Bottom