/    Sign up×
Community /Pin to ProfileBookmark

images or files share between a domain and its sub-domain

I have already developed a website for desktop platform user and now I am thinking about making it also compatible for mobile device user (larger buttons, more simple layout, less javascript more css3, etc)

So I will make a sub domain (mobile.mydomain.com) and I will write a simple version of my website. However, there are some files like images and essential javascript files that I want to share between the domain and sub domain so I don’t have to put the same thing in two places.

So is it possible to achieve this by using php scripts? I have googled a bit and I came across the term ‘symlink’. Is it about what I want to achieve?

I am hoping someone can guide me (at least roughly) what I should do. Thank you very much

to post a comment
PHP

2 Comments(s)

Copy linkTweet thisAlerts:
@ZABIMay 02.2013 — whats wrong with http://mydomain.com/js/script.js etc...
Copy linkTweet thisAlerts:
@jeffapauthorMay 02.2013 — so it is like when i have an image on the page it would be <img src="http://mydomain.com/images/1.jpg">?

right... i was thinking in a hard way... thanks anyway!
×

Success!

Help @jeffap spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 6.17,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @nearjob,
tipped: article
amount: 1000 SATS,

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,
)...