<?xml version="1.0" encoding="utf-8" ?><rss version="2.0" xml:base="https://www.webmaster-forums.net/crss/node/1017019" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title></title>
    <link>https://www.webmaster-forums.net/crss/node/1017019</link>
    <description></description>
    <language>en</language>
          <item>
    <title></title>
    <link>https://www.webmaster-forums.net/serverside-scripting/redirecting-urls-specific-referrals#comment-1099451</link>
    <description> &lt;p&gt;Yes, it would throw up a 500 Server Error on all pages under the directory where mod_rewrite is called.&lt;/p&gt;
 </description>
     <pubDate>Fri, 25 Jan 2002 10:00:38 +0000</pubDate>
 <dc:creator>Wil</dc:creator>
 <guid isPermaLink="false">comment 1099451 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title></title>
    <link>https://www.webmaster-forums.net/serverside-scripting/redirecting-urls-specific-referrals#comment-1099424</link>
    <description> &lt;p&gt;Would Apache give an error of some sort if the rewrite mod wasn&#039;t installed?&lt;/p&gt;
 </description>
     <pubDate>Fri, 25 Jan 2002 06:18:02 +0000</pubDate>
 <dc:creator>Mark Hensler</dc:creator>
 <guid isPermaLink="false">comment 1099424 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title></title>
    <link>https://www.webmaster-forums.net/serverside-scripting/redirecting-urls-specific-referrals#comment-1099359</link>
    <description> &lt;p&gt;I am so sorry, but no that snippet isn&#039;t working either. Yes, I have made sure all URLs are active and correct. Maybe my web server just won&#039;t allow such things?&lt;/p&gt;
&lt;p&gt;My web host was not much help. They told me they did not offer support for .htaccess and to study it through apache.org. At least they provided something, right? &lt;/p&gt;
&lt;p&gt;I looked through apache.org late last night, but my brain wasn&#039;t focusing. (Long day at a clients&#039; office. I dreamed of code last night. Argh.) I did see where the snippets you are giving me are derived, but with no previous knowledge of this type programming, there isn&#039;t any way I&#039;d be able to figure it out without much in depth study. &lt;/p&gt;
&lt;p&gt;The problem with this referring URL isn&#039;t too extensive yet unless this individual becomes even more weird. &lt;img src=&quot;https://www.webmaster-forums.net/misc/smileys/smile.png&quot; title=&quot;Smiling&quot; alt=&quot;Smiling&quot; class=&quot;smiley-content&quot; /&gt;&lt;/p&gt;
&lt;p&gt;Thanks so much for your help.&lt;/p&gt;
 </description>
     <pubDate>Thu, 24 Jan 2002 15:10:11 +0000</pubDate>
 <dc:creator>Bright Eyes</dc:creator>
 <guid isPermaLink="false">comment 1099359 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title></title>
    <link>https://www.webmaster-forums.net/serverside-scripting/redirecting-urls-specific-referrals#comment-1099341</link>
    <description> &lt;p&gt;OK. Try this one! &lt;img src=&quot;https://www.webmaster-forums.net/misc/smileys/smile.png&quot; title=&quot;Smiling&quot; alt=&quot;Smiling&quot; class=&quot;smiley-content&quot; /&gt;&lt;/p&gt;
&lt;p&gt;&lt;div class=&quot;codeblock&quot;&gt;&lt;code&gt;RewriteEngine on&lt;br /&gt;RewriteCond	%{HTTP_REFERRER}	^&amp;lt;strong&amp;gt;http://www.domain.com/links.html&amp;lt;/strong&amp;gt;$&lt;br /&gt;RewriteRule	^&amp;lt;strong&amp;gt;/page/requested.html&amp;lt;/strong&amp;gt;*	&amp;lt;strong&amp;gt;/other.html&amp;lt;/strong&amp;gt; [R]&lt;/code&gt;&lt;/div&gt;&#039;&lt;br /&gt;
Replace the following bits...&lt;/p&gt;
&lt;p&gt;Replace the &lt;strong&gt;red&lt;/strong&gt; text with the exact page the user is coming from.&lt;/p&gt;
&lt;p&gt;Replace the &lt;strong&gt;blue&lt;/strong&gt; text with the page he is trying to request on your server. Don&#039;t use the full domain, just /path/to/page.html will do.&lt;/p&gt;
&lt;p&gt;Replace the &lt;strong&gt;green&lt;/strong&gt; text with the page you want him redirected to. Again just use the partial path, i.e. /path/to/other.html.&lt;/p&gt;
&lt;p&gt;How are you testing this, BTW? You are sure to be following the exact link from the other guy&#039;s page, right?&lt;/p&gt;
 </description>
     <pubDate>Thu, 24 Jan 2002 11:10:26 +0000</pubDate>
 <dc:creator>Wil</dc:creator>
 <guid isPermaLink="false">comment 1099341 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title></title>
    <link>https://www.webmaster-forums.net/serverside-scripting/redirecting-urls-specific-referrals#comment-1099298</link>
    <description> &lt;p&gt;My Bad..&lt;/p&gt;
&lt;p&gt;sorry about that, should have paid more attention to the thread!. As far as PHP goes, I will leave it to the experts!&lt;/p&gt;
 </description>
     <pubDate>Thu, 24 Jan 2002 01:52:20 +0000</pubDate>
 <dc:creator>detox</dc:creator>
 <guid isPermaLink="false">comment 1099298 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title></title>
    <link>https://www.webmaster-forums.net/serverside-scripting/redirecting-urls-specific-referrals#comment-1099270</link>
    <description> &lt;p&gt;Hi Wil, Sorry to say that snippet doesn&#039;t work either. I really feel fortunate that you folks are all trying to help. Thank you once again. I did everything exactly as shown. I am going to send this snippet to my domain host and ask them if there is another format that will work. Perhaps if they see it, maybe it will ring a few bells? Any other suggestions is GREATLY appreciated.&lt;/p&gt;
&lt;p&gt;detox, I don&#039;t know anything about ASP. Doesn&#039;t that require an NT server? I would have no clue where to begin actually. But I wouldn&#039;t rule anything out as long as I don&#039;t need a different server than what I currently have.&lt;/p&gt;
 </description>
     <pubDate>Wed, 23 Jan 2002 21:16:57 +0000</pubDate>
 <dc:creator>Bright Eyes</dc:creator>
 <guid isPermaLink="false">comment 1099270 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title></title>
    <link>https://www.webmaster-forums.net/serverside-scripting/redirecting-urls-specific-referrals#comment-1099197</link>
    <description> &lt;p&gt;OK.&lt;/p&gt;
&lt;p&gt;Does this work?&lt;/p&gt;
&lt;p&gt;&lt;div class=&quot;codeblock&quot;&gt;&lt;code&gt;RewriteEngine on&lt;br /&gt;RewriteCond	%{HTTP_REFERRER}	^&amp;lt;strong&amp;gt;http://www.domain.com/links.html&amp;lt;/strong&amp;gt;$&lt;br /&gt;RewriteRule	^.*	&amp;lt;strong&amp;gt;http://www.domain.com/other.html&amp;lt;/strong&amp;gt; [R]&lt;/code&gt;&lt;/div&gt;&#039;&lt;br /&gt;
Try and keep the tabs in there if you can. Enter the exact domain name and the the page where the link is coming from where I&#039;ve marked as red. Enter the new URL to redirect yo where I&#039;ve marked green.&lt;/p&gt;
&lt;p&gt;Let me know how you get on.&lt;/p&gt;
 </description>
     <pubDate>Wed, 23 Jan 2002 13:03:32 +0000</pubDate>
 <dc:creator>Wil</dc:creator>
 <guid isPermaLink="false">comment 1099197 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title></title>
    <link>https://www.webmaster-forums.net/serverside-scripting/redirecting-urls-specific-referrals#comment-1099195</link>
    <description> &lt;p&gt;Seems sometimes like I am a dinosaur for primarily using ASP, however this is very easy and simple to do in ASP.&lt;/p&gt;
&lt;p&gt;Do you want to try it with ASP? You shouldn;t even get to the page because the page will be parsed before it is displayed and the ASP check for the referring url will run and simply redirect your visitors...&lt;/p&gt;
 </description>
     <pubDate>Wed, 23 Jan 2002 12:47:37 +0000</pubDate>
 <dc:creator>detox</dc:creator>
 <guid isPermaLink="false">comment 1099195 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title></title>
    <link>https://www.webmaster-forums.net/serverside-scripting/redirecting-urls-specific-referrals#comment-1099152</link>
    <description> &lt;p&gt;Hi Wil, thank you so much for helping. Suzanne too!  &lt;/p&gt;
&lt;p&gt;I tried the snippet just as you coded it replacing domain.com with theirsite.com and the other URL as &lt;a href=&quot;http://www.mysite.com/page.html&quot; class=&quot;bb-url&quot;&gt;http://www.mysite.com/page.html&lt;/a&gt; ... however, it still does not work.&lt;/p&gt;
&lt;p&gt;There is nothing in the .htaccess file at the moment. There was a deny statement for a certain ISP, but that was a problem some time back which is now resolved, so I took it out.&lt;/p&gt;
&lt;p&gt;The .htaccess file is located here: &lt;a href=&quot;http://www.mysite.com/.htaccess&quot; class=&quot;bb-url&quot;&gt;http://www.mysite.com/.htaccess&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Is that what you mean by root directory or do you mean absolute path? Such as ...&lt;/p&gt;
&lt;p&gt;/home/mysite/www/.htaccess&lt;/p&gt;
 </description>
     <pubDate>Wed, 23 Jan 2002 00:19:33 +0000</pubDate>
 <dc:creator>Bright Eyes</dc:creator>
 <guid isPermaLink="false">comment 1099152 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title></title>
    <link>https://www.webmaster-forums.net/serverside-scripting/redirecting-urls-specific-referrals#comment-1099138</link>
    <description> &lt;p&gt;Yes, that&#039;s exactly what that snippet I posted above should do. Well, not exactly. I&#039;ve had a chance to play around with the syntax and found out that I was excluding everyone bar the given hostname, so I&#039;ve removed the &lt;strong&gt;!&lt;/strong&gt; and it should work OK.&lt;/p&gt;
&lt;p&gt;Use this modifed version:&lt;/p&gt;
&lt;p&gt;&lt;div class=&quot;codeblock&quot;&gt;&lt;code&gt;RewriteEngine on&lt;br /&gt;RewriteCond %{HTTP_REFERRER} ^.*&amp;lt;strong&amp;gt;domain.com&amp;lt;/strong&amp;gt;.*$ [nocase]&lt;br /&gt;RewriteRule ^.*	&amp;lt;a href=&amp;quot;http://www.domain.com/other.html&amp;quot; class=&amp;quot;bb-url&amp;quot;&amp;gt;http://www.domain.com/other.html&amp;lt;/a&amp;gt; [R]&lt;/code&gt;&lt;/div&gt;&#039;&lt;br /&gt;
Obviously you would replace &lt;strong&gt;domain.com&lt;/strong&gt; with the domain you are trying to redirect.&lt;/p&gt;
&lt;p&gt;[nocase] simply means to ignore case. This means that the URL &lt;a href=&quot;http://www.DoMaIn.com&quot; class=&quot;bb-url&quot;&gt;DoMaIn.com&lt;/a&gt; is treated exactly the same as &lt;a href=&quot;http://www.domain.com.&quot; class=&quot;bb-url&quot;&gt;domain.com.&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;You mentioned a problem with a htaccess file already being there? Ugh. You will most likely need to place the above in a htaccess file in the root directory of your site. It&#039;s usually quite safe to append this to an exisitng htaccess file however there might be conflicts.&lt;/p&gt;
&lt;p&gt;What&#039;s in your .htaccess file now? Is this file in a specified directory or controlling your entire domain through being in the / root directory?&lt;/p&gt;
 </description>
     <pubDate>Tue, 22 Jan 2002 21:26:39 +0000</pubDate>
 <dc:creator>Wil</dc:creator>
 <guid isPermaLink="false">comment 1099138 at https://www.webmaster-forums.net</guid>
  </item>
  </channel>
</rss>
