<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: How do you redirect a webpage from http://domain.com to http://www.domain.com without mod_rewrite?</title>
	<atom:link href="http://www.playingwithwire.com/2006/11/how-do-you-redirect-a-webpage-from-httpdomaincom-to-httpwwwdomaincom-without-mod_rewrite/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.playingwithwire.com/2006/11/how-do-you-redirect-a-webpage-from-httpdomaincom-to-httpwwwdomaincom-without-mod_rewrite/</link>
	<description>The Internet Startup Blog</description>
	<lastBuildDate>Sat, 24 Oct 2009 19:07:30 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
	<item>
		<title>By: Viktor Petersson</title>
		<link>http://www.playingwithwire.com/2006/11/how-do-you-redirect-a-webpage-from-httpdomaincom-to-httpwwwdomaincom-without-mod_rewrite/comment-page-1/#comment-13</link>
		<dc:creator>Viktor Petersson</dc:creator>
		<pubDate>Sun, 05 Nov 2006 22:20:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.playingwithwire.com/test/?p=25#comment-13</guid>
		<description>I might also add that another solution that Alex suggested was to use the Redirect-feature in .htaccess. I found something that was called RedirectMatch. The command is given as follows:

&quot;RedirectMatch (.*).gif$ http://www.anotherserver.com$1.jpg&quot; 

The benefit to this in contrast to regular Redirect is that you can use regular-expression to match. However, what I ended up with was an infinite loop, since I redirected over and over to the same page.

This might work for other people though, but not for me.</description>
		<content:encoded><![CDATA[<p>I might also add that another solution that Alex suggested was to use the Redirect-feature in .htaccess. I found something that was called RedirectMatch. The command is given as follows:</p>
<p>&#8220;RedirectMatch (.*).gif$ <a href="http://www.anotherserver.com$1.jpg" rel="nofollow">http://www.anotherserver.com$1.jpg</a>&#8221; </p>
<p>The benefit to this in contrast to regular Redirect is that you can use regular-expression to match. However, what I ended up with was an infinite loop, since I redirected over and over to the same page.</p>
<p>This might work for other people though, but not for me.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Alexander Ljungberg</title>
		<link>http://www.playingwithwire.com/2006/11/how-do-you-redirect-a-webpage-from-httpdomaincom-to-httpwwwdomaincom-without-mod_rewrite/comment-page-1/#comment-12</link>
		<dc:creator>Alexander Ljungberg</dc:creator>
		<pubDate>Sun, 05 Nov 2006 12:33:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.playingwithwire.com/test/?p=25#comment-12</guid>
		<description>The CMS &lt;a HREF=&quot;http://e107.org&quot; REL=&quot;nofollow&quot; rel=&quot;nofollow&quot;&gt;e107&lt;/A&gt; has functionality like this built in. On the preferences page you can enter the primary host name of the website and then there is an option to redirect all users to that name.

So for &lt;a HREF=&quot;http://www.norwinter.com&quot; REL=&quot;nofollow&quot; rel=&quot;nofollow&quot;&gt;http://www.norwinter.com&lt;/A&gt; for example, some users come in through &lt;a HREF=&quot;http://ext2.norwinter.com&quot; REL=&quot;nofollow&quot; rel=&quot;nofollow&quot;&gt;http://ext2.norwinter.com.&lt;/A&gt; due to old links and stuff. They all end up getting www.norwinter.com in their address bar.</description>
		<content:encoded><![CDATA[<p>The CMS <a HREF="http://e107.org" REL="nofollow" rel="nofollow">e107</a> has functionality like this built in. On the preferences page you can enter the primary host name of the website and then there is an option to redirect all users to that name.</p>
<p>So for <a HREF="http://www.norwinter.com" REL="nofollow" rel="nofollow">http://www.norwinter.com</a> for example, some users come in through <a HREF="http://ext2.norwinter.com" REL="nofollow" rel="nofollow">http://ext2.norwinter.com.</a> due to old links and stuff. They all end up getting <a href="http://www.norwinter.com" rel="nofollow">http://www.norwinter.com</a> in their address bar.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Viktor Petersson</title>
		<link>http://www.playingwithwire.com/2006/11/how-do-you-redirect-a-webpage-from-httpdomaincom-to-httpwwwdomaincom-without-mod_rewrite/comment-page-1/#comment-11</link>
		<dc:creator>Viktor Petersson</dc:creator>
		<pubDate>Sun, 05 Nov 2006 10:25:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.playingwithwire.com/test/?p=25#comment-11</guid>
		<description>My friend Ben wrote me an e-mail informing me about another possible workaround. Here it goes:

&quot;You *might* be able to use (before anything else on the page)
if ($_SERVER[&#039;SERVER_NAME&#039;] != www.domain.tld) {
  header(&quot;Location: http://www.domain.tld/path/name.ext&quot;);
}

The caveat is that $_SERVER[&#039;SERVER_NAME&#039;] may return www.domain.tld
even though the requested URI was domain.tld.  A possible workaround
is given here: http://www.apacheref.com/ref/http_core/
UseCanonicalName.html.  But this assumes you have privileges to
configure apache.&quot;

It might work, I don&#039;t know, but since I&#039;m running a complete CMS-system, I&#039;d try to avoid hacking the files too much (to make it easier when updating etc.). But thanks Ben, it might be a better solution for some of our readers.</description>
		<content:encoded><![CDATA[<p>My friend Ben wrote me an e-mail informing me about another possible workaround. Here it goes:</p>
<p>&#8220;You *might* be able to use (before anything else on the page)<br />
if ($_SERVER['SERVER_NAME'] != <a href="http://www.domain.tld" rel="nofollow">http://www.domain.tld</a>) {<br />
  header(&#8220;Location: <a href="http://www.domain.tld/path/name.ext" rel="nofollow">http://www.domain.tld/path/name.ext</a>&#8220;);<br />
}</p>
<p>The caveat is that $_SERVER['SERVER_NAME'] may return <a href="http://www.domain.tld" rel="nofollow">http://www.domain.tld</a><br />
even though the requested URI was domain.tld.  A possible workaround<br />
is given here: <a href="http://www.apacheref.com/ref/http_core/" rel="nofollow">http://www.apacheref.com/ref/http_core/</a><br />
UseCanonicalName.html.  But this assumes you have privileges to<br />
configure apache.&#8221;</p>
<p>It might work, I don&#8217;t know, but since I&#8217;m running a complete CMS-system, I&#8217;d try to avoid hacking the files too much (to make it easier when updating etc.). But thanks Ben, it might be a better solution for some of our readers.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Minified using apc
Page Caching using apc
Database Caching 1/6 queries in 0.006 seconds using apc
Object Caching 215/216 objects using apc

Served from: playingwithwire.* @ 2012-02-09 05:00:45 -->
