LiveWire Network Peer Answers Peer Support Teen Forums Tech Forums College Forums 633 users online 174671 members 1394 active today Advertise Here Sign In
TeenCollegeTechPhotos | Quizzes | LiveSecret | Video | Dictionary | News | FAQ
You have 1 new message.
Emergency Help
Until you sign up you can't do much. Yes, it's free.

Sign Up Now
Membername:
Password:
Already have an account?
Invite Friends
Active Members
Groups
Contests
Moderators
7 online / 34 MPM
Fresh Topics
  LiveWire / Technical Forums / Programming & Application Development / Viewing Topic

mod_rewrite
Replies: 3Last Post Sep. 1, 2007 2:02pm by Hexer
Single page for this topic Email Print Favorite
( Hexer )


Guru

Patron
Support Leader
Tech Support Leader
Reply
I need some help with mod_rewrite. I have lots of domains and under my new site structure I am running all my sites off of one domain. As such I need to ensure that my old domains direct to the correct area.

I'm using:
Code:
RewriteEngine On
RewriteCond %{HTTP_HOST} !^elderscrolls.co.uk$ [NC]
RewriteRule ^(.*)$ http://www.newgecko.co.uk/GAME/ES/$1 [R,L]

HOWEVER I have more than the one address to 'redirect' and using this code again does not work as it always follows the first rule. How can I set it up in my htaccess so that:

newgecko.net  >> newgecko.co.uk/NET
elderscrolls.co.uk >> newgecko.co.uk/GAME/ES
oblivion-online.com >> newgecko.co.uk/GAME/ES
newgecko.co.uk >> newgecko.co.uk/SITE

(example,)

I would prefer to do this using rewrite as it loads the correct files. I.E

elderscrolls.co.uk/Downloads.html
directs to
http://www.newgecko.co.uk/GAME/ES/Downloads.html

with my current setup

-------
Hexer™   ~  I'm just happy to be me :)
~ Cheer up and have a digital cookie ®
I gots myself a purty red bar :D
Hexer County


3:39 pm on Aug. 31, 2007 | Joined July 2005 | 271 Days Active
Join to learn more about Hexer England, United Kingdom | Straight Male | 3570 Posts | 21990 Points
( Hexer )


Guru

Patron
Support Leader
Tech Support Leader
Reply
NM, I solved this issue :)

-------
Hexer™   ~  I'm just happy to be me :)
~ Cheer up and have a digital cookie ®
I gots myself a purty red bar :D
Hexer County

7:30 pm on Aug. 31, 2007 | Joined July 2005 | 271 Days Active
Join to learn more about Hexer England, United Kingdom | Straight Male | 3570 Posts | 21990 Points
allsmiles


Soothsayer

Ad Free
Reply
What's the solution? That information could be useful for other people.

-------
When they leave me, they're all smiles.
When they leave you, they're in tears.

5:17 am on Sep. 1, 2007 | Joined Aug. 2007 | 309 Days Active
Join to learn more about allsmiles England, United Kingdom | Male | 5726 Posts | 11113 Points
( Hexer )


Guru

Patron
Support Leader
Tech Support Leader
Reply
I rooted the domains to their own directory, each with its own .htaccess and redirect php incase something goes wrong.

-------
Hexer™   ~  I'm just happy to be me :)
~ Cheer up and have a digital cookie ®
I gots myself a purty red bar :D
Hexer County

2:02 pm on Sep. 1, 2007 | Joined July 2005 | 271 Days Active
Join to learn more about Hexer England, United Kingdom | Straight Male | 3570 Posts | 21990 Points
Single page for this topic Email Print Favorite

Quick Reply

You are signed in as our guest.

Looking for something else?
 

  LiveWire / Technical Forums / Programming & Application Development / Viewing Topic