Forum Moderators: phranque
i've looked around the forum but i haven't found a fix for my situation ...
i set up a client's helpdesk on my own web space but i used their subdomain. i want to be able to redirect visitors to the files on my web space but mask it so they don't know they are actually looking at another domain. my client is on a linux server, shared IP, doesn't support PHP. the .htaccess file is in the root.
below is what my .htaccess looks like ... of course, it does NOT work cuz i don't really know what i'm doing. so don't be too too brutal.
RewriteEngine on
RewriteRule ^index\.html$ example.com/ex/index.php [R]
[edited by: jdMorgan at 3:23 am (utc) on July 6, 2005]
[edit reason] Exampified. [/edit]
Welcome to WebmasterWorld!
It sounds like you want to proxy request for certain files over to your server. In that case, check out RewriteRule's [P] flag in the mod_rewrite documentation [httpd.apache.org].
The biggest part of this job is to define the pages that you want to proxy. This part is identical to what you're doing now with the redirect in your code, and I'd encourage you to go ahead and use the redirect until you get all of the URLs redirected properly. Then change from the [R] flag to [P] and the action will become transparent.
RewriteEngine on
RewriteRule ^index\.html$ http://www.example.com/ex/index.php [R,L]
Jim
The code has to go into a directory in a path where it will be executed when the 'help' files are requested on your client's server.
While testing using 301 or 302 redirects, you will see the URL update in your browser's address bar. Once you get all files redirecting properly, then you can change the [R] flag to [P] and you should no longer see the address bar update. If the request results in the page being served by your server, then it's working.
Jim