How to Apache redirect to address market://details?id=xxx

Alles, was den Apache betrifft, kann hier besprochen werden.

How to Apache redirect to address market://details?id=xxx

Postby ttkien1609 » 13. September 2014 02:30

On my website I need redirect Android users to my application on Android Market. I have file config on apache:

RewriteCond %{HTTP_USER_AGENT} Android [NC]

RewriteRule ^/$ market://details?id=......

But it doesn't work.

You can see Website zaloapp.vn have configured successful.

Please for idea. Thanks
ttkien1609
 
Posts: 3
Joined: 13. September 2014 02:20
Operating System: facebook.com

Re: How to Apache redirect to address market://details?id=xx

Postby Nobbie » 13. September 2014 14:26

a) Insert the following line in top:

Code: Select all
RewriteEngine On


b) Leave out the slash '/' in the RewriteRule:

Code: Select all
RewriteRule ^$ market://details?id=......



First only try a), if it does not help, try a) and b)

Dont forget to restart Apache after each change.
Nobbie
 
Posts: 8775
Joined: 09. March 2008 13:04

Re: How to Apache redirect to address market://details?id=xx

Postby ttkien1609 » 15. September 2014 02:20

Thank Nobbie, I have edit config:

RewriteEngine on
RewriteCond %{HTTP_USER_AGENT} "android|blackberry|googlebot-mobile|iemobile|ipad|iphone|ipod|opera mobile|palmos|webos" [NC]
RewriteRule ^$ market://details?id=..... [L,R=301]

But it doesn't work.

Please help me, thanks
ttkien1609
 
Posts: 3
Joined: 13. September 2014 02:20
Operating System: facebook.com

Re: How to Apache redirect to address market://details?id=xx

Postby Nobbie » 15. September 2014 12:36

ttkien1609 wrote:Thank Nobbie, I have edit config:


Where did you put this lines?

Did you look into error.log for any clue?
Nobbie
 
Posts: 8775
Joined: 09. March 2008 13:04

Re: How to Apache redirect to address market://details?id=xx

Postby ttkien1609 » 16. September 2014 03:21

Where did you put this lines?
Code: Select all
I put in file httpd.conf
<VirtualHost *:80>
   ServerName xxx
   RewriteEngine on
   RewriteCond %{HTTP_USER_AGENT} "android|blackberry|googlebot-mobile|iemobile|ipad|iphone|ipod|opera mobile|palmos|webos" [NC]   
   RewriteRule ^$ market://details?id=x.x.x[L,R=301]
   JkMount /* xxx
</VirtualHost>


Did you look into error.log for any clue?

does not be found bug

I think, Apache is not supported functionality (RewriteRule ^$ market://details?id=x.x.x[L,R=301])

:(
ttkien1609
 
Posts: 3
Joined: 13. September 2014 02:20
Operating System: facebook.com

Re: How to Apache redirect to address market://details?id=xx

Postby Nobbie » 16. September 2014 17:18

There is no error logging specified for that VirtualHost, you should apply an error log and look into the file later an.
Nobbie
 
Posts: 8775
Joined: 09. March 2008 13:04


Return to Apache

Who is online

Users browsing this forum: No registered users and 3 guests