View Single Post
Old 10-25-2011, 03:33 PM   PM User | #1
Ty44ler
New Coder

 
Join Date: Feb 2008
Posts: 57
Thanks: 8
Thanked 0 Times in 0 Posts
Ty44ler is an unknown quantity at this point
Replacing one word for entire site depending on the URL.

I have two domains. I'd like to replace a word depending on the URL the user has typed in.

For example:
Original site is all about red pens. Well I want to make another domain that is bluepens.com, but when they enter in bluepens.com it uses the same pages from red pens except wherever the word 'red' is found it is changed to blue pens making it a whole new site.

I know I can use str_replace() for certain instances, but how would you do it for an entire website using the url?

Thanks!
Ty44ler is offline   Reply With Quote