Web Hosting Talk







View Full Version : help need in rewrite url....


shivdalvi
02-20-2009, 10:35 AM
I have to set rewrite rule in my conf file :
main url will be like :
1.xyz.com/worker which is from server of xyz.com
2.xyz.com/redirect.php?type=worker which is from server of xyz.com
will redirect to 123.com server but rewrite & referenced as xyz.com/worker or xyz.com/redirect.php?type=worker
on 123.com :
DocumentRoot will be set to :
/var/www/html/basic/layout/index.php
how should i configure this .

mg-
02-20-2009, 03:12 PM
I'm confused.. are you trying to simply mirrow xyz and 123?
or do you want to rewrite
xyz.com/(worker-variable)
xyx.com/redirect.php?type=(worker-variable)
and have it do the same on 123.com
123.com/(worker-variable)
etc.
Or does it all simply goto the same page?
If you're simply wanting to have any subdomain point to a php script, I use AliasMatch ^/workers/* "path/to/php/script" If you want each specific worker have it's own php script, then rewrite is in order.. but I'm having a hard time understanding exactly what you want