Link Exchange Forum
May 24, 2012, 07:04:48 AM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News: Welcome to Link Exchange Forum, a Webmaster Forum where you can find link exchange partners and discuss webmaster related topics.  A friendly forum for Webmasters!
 
   Home   Help Search Members Login Register  
Pages: [1]
 
Author Topic: 301 Redirect suggestions??  (Read 515 times)
realistic
Guest
« on: December 12, 2009, 09:15:02 AM »

301 Redirect- How to cannibalize homepage for windows server/asp?

How do I cannibalize a non www version to the www version of the site...I tried using this:

Code:

http://sitename.com: <%@ Language=VBScript %>
<%
Response.Status=”301 Moved Permanently”
Response.AddHeader “Location”, http://www.sitename.com
%>
Logged
eguynth
Newbie
*
Posts: 1



View Profile Email
« Reply #1 on: June 03, 2010, 08:13:04 AM »

try
# force www
RewriteCond %{HTTP_HOST} ^example\.com$ [NC]
RewriteRule ^(.*)$ http://www.example.com/$1 [R=301,L]
Logged

I was looking for a seo forum about internet seo marketing
brianwoods
Newbie
*
Posts: 9



View Profile WWW
« Reply #2 on: February 22, 2011, 10:03:23 AM »

eguynth you are giving the php code
Logged
tophi
Newbie
*
Posts: 1


View Profile
« Reply #3 on: March 17, 2011, 11:54:42 AM »

And here is an example for nginx server's conf :

Code:

     ## Redirect from www to non-www:
      if ($host = 'www.yoursitenam3.com' ) {
        rewrite  ^/(.*)$  http://yoursitenam3.com/$1  permanent;
      }
Logged
Elsnercardone
Newbie
*
Posts: 10


View Profile
« Reply #4 on: June 02, 2011, 01:22:27 PM »

Tophi, thank you for example...it's also useful for me
Logged
Pages: [1]
 
 
Jump to:  


Link Exchange Forum - Webmaster Forum
Support Our Site
Privacy Policy
Powered by SMF 1.1.12 | SMF © 2006-2009, Simple Machines LLC