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,532
Likes: 150
UBB.threads Developer
UBB.threads Developer
Joined: Jun 2006
Posts: 16,532
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
PHP 8 bug in membermanage.tmpl
by phoenix011235 - 09/08/2026 7:47 PM
Are any of these legitmate?
by Baldeagle - 09/06/2026 1:37 PM
After server reboot
by Morgan - 09/02/2026 8:27 AM
8.0.1 Patch Changelog Discussion
by isaac - 11/26/2025 1:34 PM
Who's Online Now
1 members (Rick Gardner), 283 guests, and 175 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)