/    Sign up×
Community /Pin to ProfileBookmark

Two websites –> one domainname

Hi,

For a client a created a Flash website for PC’s and an HTML website for UMTS phones. He has one domainname, let’s say [url]www.example.com.[/url] Now he wants that when he goes to [url]www.example.com[/url] with his PC, he sees the Flash website and when he goes to [url]www.example.com[/url] with is UMTS phone he sees the HTML website.

Is this possible? If yes, how can I do this?

Thank’s in advance for your answer!

Frank

to post a comment
Full-stack Developer

3 Comments(s)

Copy linkTweet thisAlerts:
@AdamGundrySep 22.2004 — You can probably use [url=http://www.engelschall.com/pw/apache/rewriteguide/#ToC25]url rewriting[/url] to change the pages served based on the value of the User-Agent header. [url=http://www.nnh.co.uk/wap/dev_user_agent.html]This page[/url] contains a list of commonly used User-Agent strings.

Alternatively, use a server-side script to examine the value of the User-Agent header and send a 3xx redirect instruction.

Adam
Copy linkTweet thisAlerts:
@Frank1984authorSep 22.2004 — [i]Originally posted by AdamGundry [/i]

[B]You can probably use [url=http://www.engelschall.com/pw/apache/rewriteguide/#ToC25]url rewriting[/url] to change the pages served based on the value of the User-Agent header. [url=http://www.nnh.co.uk/wap/dev_user_agent.html]This page[/url] contains a list of commonly used User-Agent strings.



Alternatively, use a server-side script to examine the value of the User-Agent header and send a 3xx redirect instruction.



Adam [/B]
[/QUOTE]


Thanks! The User-Agents strings from the list are the ones I need. The other page probably tells me how to redirect a visitor with help of a User-Agent. But I can't reaally find which data I have tot implement in my websaite so that a User-Agent can be used. Can you tell me which data from that list I should implement in my website so that a visitor will be redirected by using an User-Agent?
Copy linkTweet thisAlerts:
@AdamGundrySep 22.2004 — Assuming you are using the Apache web server, you can create a text file in the top directory of your server called ".htaccess" (no quotes) like this (it will vary slightly depending on your server setup):
RewriteEngine on
RewriteCond %{HTTP_USER_AGENT} ^Noki.* [OR]
RewriteCond %{HTTP_USER_AGENT} ^Eric.* [OR]
RewriteCond %{HTTP_USER_AGENT} ^WapI.* [OR]
RewriteCond %{HTTP_USER_AGENT} ^MC21.* [OR]
RewriteCond %{HTTP_USER_AGENT} ^AUR.* [OR]
RewriteCond %{HTTP_USER_AGENT} ^R380.* [OR]
RewriteCond %{HTTP_USER_AGENT} ^T20.* <br/>
RewriteRule ^(.*) /html/$1 [L]

RewriteRule ^(.*) /flash/$1 [L]

Adam
×

Success!

Help @Frank1984 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,
)...