2 site one host ... and one problem

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
onlinetime
Forum Newbie
Posts: 3
Joined: Fri Mar 04, 2005 1:00 pm

2 site one host ... and one problem

Post by onlinetime »

Hello all.
I have 2 sites: 1.com and 2.com.

This site are hosting to the same directory. 1.com/test.php=2.com/test.php

I have more then 5000 th pages (.php).
I want a script: if i acces 1.com/a_file.php to redirect me to 2.com/a_file.php ( 1.com/other.php to 2.com/other.php ... etc etc)

a_file.php it's one of the 5000's pages ( i want to work for all pages).

Who help me?

10x to all.
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

mod_rewrite.
onlinetime
Forum Newbie
Posts: 3
Joined: Fri Mar 04, 2005 1:00 pm

But ...

Post by onlinetime »

10x, but i don't have acces to apache.. I have acces to the directory of the site /site etc. I want a mini script to do this... So...
:roll:
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

if your server is apache, and you mod_rewrite is loaded, you can do it through .htaccess
onlinetime
Forum Newbie
Posts: 3
Joined: Fri Mar 04, 2005 1:00 pm

Yu..

Post by onlinetime »

But i'm new of php, and i don't know to do this file. Can you create for me, and i just to put on my sevrer? Please..
Post Reply