Previous Thread
Next Thread
Print Thread
Hop To
Joined: Jun 2006
Posts: 3,839
Likes: 1
I
Ian
Offline
Carpal Tunnel
Carpal Tunnel
I Offline
Joined: Jun 2006
Posts: 3,839
Likes: 1
Hi,

Two sites on the same server.

Is there a way to set up an alias so that anything at domaina.com/images is actually pointing at domainb.com/images

where the full path of domaina.com is /var/path/to/domaina.com/images/ and domainb.com is /var/path/to/domainb.com/images.

/var/pth/to/domaina.com/images would not actually exist, but be an alias of /var/path/to/domainb.com/images.

Hope that makes sense smile

Essentially I need to know the command within linux to set this up whilst SSHing in.

Thanks.

Joined: Jun 2006
Posts: 9,242
Likes: 1
R
Former Developer
Former Developer
R Offline
Joined: Jun 2006
Posts: 9,242
Likes: 1
You should be able to do that making a symbolic link.

ln -s target_filename symlink_filename

target_filename would be /var/path/to/domainb.com/images

symlink_filename would be /var/pth/to/domaina.com/images

So, this should do the trick:

Code
ln -s /var/path/to/domainb.com/images /var/pth/to/domaina.com/images

Joined: Jun 2006
Posts: 16,537
Likes: 150
UBB.threads Developer
UBB.threads Developer
Joined: Jun 2006
Posts: 16,537
Likes: 150
YEh, a symblink should work just fine; I use it for several directories on my systems. You'll likely need to be root to be able to run the command.


I am a Web Development Contractor, I do not work for UBBCentral. I have provided free User to User Support since the beginning of these support forums.
Do you need Forum Install or Upgrade Services?
Forums: A Gardeners Forum
UBB.threads: UBBWiki, UBB Styles, UBB.Sitemaps
Longtime Supporter & Resident Post-A-Holic
VNC Web Services: Code Modifications, Upgrades, Styling, Coding Services, Disaster Recovery, and more!
Joined: Jun 2006
Posts: 3,839
Likes: 1
I
Ian
Offline
Carpal Tunnel
Carpal Tunnel
I Offline
Joined: Jun 2006
Posts: 3,839
Likes: 1
Thank guys - appreciated.

I just wish to avoid uploading new images two or three times to separate URL's when the images already exist on the server.


Link Copied to Clipboard
ShoutChat
Comment Guidelines: Do post respectful and insightful comments. Don't flame, hate, spam.
Recent Topics
Having issues going from 7.5.5. to 8X
by Mors - 10/22/2026 1:32 PM
Slow Queries - Any Ideas?
by BellaOnline - 10/16/2026 4:34 PM
Selling a Forum?
by ECNet - 10/10/2026 10:54 AM
Who's Online Now
1 members (BellaOnline), 503 guests, and 106 robots.
Key: Admin, Global Mod, Mod
Random Gallery Image
Latest Gallery Images
Ride safe!
Ride safe!
by Morgan, December 7
Los Angeles
Los Angeles
by isaac, August 6
3D Creations
3D Creations
by JAISP, December 30
Artistic structures
Artistic structures
by isaac, August 29
Powered by UBB.threads™ PHP Forum Software 8.1.0
(Snapshot build 20260527)