how to move images from sub domain to main domain |
hi all,
we have created one site in codeigniter. original site is on main domain and we created one sub_domain for our testing purpose and we have created an android app for site. but right now we are facing some problem so i need your help. 1) we have released our android app and forgot to point that app to main domain so all data coming from app get saved in sub domains db and images in uploads folder of sub domain. now we are working on to release a forced updated of android app but till then is there any solution to move images from sub domain to main domain. i have changed sub domains database name as main_db so information get saved to db but how to move that images to main domain file structure is their any way ???
Depending on your hosting platform you could make sub.domain.com an alias of www.domain.com inside your virtual host config in Apache. That way both domains will point to the same folder on the disk. So www.domain.com/images/test.jpg is the same file as http://sub.domain.com/images/test.jpg
Code: <VirtualHost IPADDRESS> If you dont have access to the apache config and the sub domain point to a different folder on disk you could just create a .htaccess file inside the sub domain webfolder to redirect all trafic to the main domain Code: RewriteCond %{HTTP_HOST} !www.domain.com [NC]
|
Welcome Guest, Not a member yet? Register Sign In |