Note that there are some explanatory texts on larger screens.

plurals
  1. POURL rewrite and Re-direct or Classic ASP script to redirect to a mobile site
    primarykey
    data
    text
    <p>I'm trying to setup a mobile re-direction script in classic ASP that detects the HTTP request and if its mobile, it will redirect the request to a mobile version of that page</p> <p>so if this link opened from a mobile device: </p> <p><a href="http://www.example.com/about.asp" rel="nofollow">http://www.example.com/about.asp</a> it would re-direct to <a href="http://m.example.com/about.asp" rel="nofollow">http://m.example.com/about.asp</a></p> <p>most of the script i have tried they all to a re-direct to the mobile site home page, but I need to have it re-direct to a page level.</p> <p>if this is doable in IIS7.5 i'm all for it too.</p> <p>I got this to work with a help,</p> <p>right now i have an issue, I have few folders which I need to block them from re-directing. i have piece of code, the folders are NOT being re-directed which is okay but when I access any other pages it goes to a homepage m.example.com....not sure what I'm doing wrong here</p> <pre><code> &lt;rule name="Mobile Redirect" stopProcessing="true"&gt; &lt;match url="^(example1|example2|exaple3)/?" ignoreCase="true" negate="true" /&gt; &lt;conditions logicalGrouping="MatchAny" trackAllCaptures="false"&gt; &lt;add input="{HTTP_USER_AGENT}" pattern="^(?!.*ipad).*(midp|mobile|phone).*$" /&gt; &lt;add input="{HTTP_X-Device-User-Agent}" pattern="midp|mobile|phone" /&gt; &lt;add input="{HTTP_X-OperaMini-Phone-UA}" pattern="midp|mobile|phone" /&gt; &lt;/conditions&gt; &lt;action type="Redirect" url="http://m.example.com/{R:0}" /&gt; &lt;/rule&gt; </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload