Forum Moderators: phranque
I have a site lets says www.site1.com and I want to have the site1's images and multimedia stuff on the folder called "files" to be retrieved from my other site www.site2.com ( I want to know what Rules and conditions do I have to put under site2.com under .htaccess file.
Currently the site two's contents accessed like this [site2.org...] I wanted it to be [site1.org...]
currently site2's htaccess file looks like this.
------------------
Options All -Indexes
ErrorDocument 404 /404.php
RewriteEngine On
RewriteRule ^category/([0-9]+).html/?$ index.php?category=$1 [L]
RewriteRule ^news/([0-9]+).html/?$ index.php?news=$1 [L]
RewriteRule ^print/([0-9]+).html/?$ print_version.php?id=$1 [L]
RewriteRule ^pdf/([0-9]+).html/?$ pdf_version.php?id=$1 [L]
RewriteRule ^comments/([0-9]+).html/?$ index.php?comments=$1 [L]
RewriteRule ^author/([^<]+).html/?$ index.php?author=$1 [L]
RewriteRule ^sitemap.xml$ plugins/sitemap/index.php [L]
RewriteCond %{REQUEST_FILENAME}!-d
RewriteRule ^([^.]+)/?$ index.php?category_name=$1 [L]
RewriteCond %{REQUEST_FILENAME}!-f
RewriteRule ^([^<]+)/([^<]+).html/?$ index.php?news=$2 [L]
php_flag display_errors On
php_value error_reporting 'E_ALL'
--------------
pls let me know what I have to do to get this done.
You can do this most efficiently in httpd.conf, using the mod_proxy [httpd.apache.org] directives. If you don't have access to httpd.conf, then you can use the RewriteRule [httpd.apache.org] [P] flag (in mod_rewrite) to do it.
Jim