HighDots Forums  

301 redirect not available on my server, other options?

Search Engine Optimization Discussion about SEO/Search Engine Optimization (alt.internet.search-engines)


Discuss 301 redirect not available on my server, other options? in the Search Engine Optimization forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Chris Michael
 
Posts: n/a

Default 301 redirect not available on my server, other options? - 06-10-2004 , 06:54 AM






I'm trying to create a few 301 redirects using a .htaccess file, but they
don't seem to be working. I've contacted my web hosting company and they
replied with "Our servers run Microsoft OS and Web Servers, .htaccess is a
feature of Linux/Apache web servers." Very helpful!

Does that mean I can't create 301 redirects? If not, then will the following
ASP code be just as effective?

<%@ Language=VBScript %>
<%
response.status="301 moved permanently"
Response.AddHeader "Location", "http://www.domain.com/file-location.html"
%>

Thanks,
--
Chris Michael



Reply With Quote
  #2  
Old   
Sven
 
Posts: n/a

Default Re: 301 redirect not available on my server, other options? - 06-10-2004 , 07:32 AM






Quote:
I'm trying to create a few 301 redirects using a .htaccess file, but they
don't seem to be working. I've contacted my web hosting company and they
replied with "Our servers run Microsoft OS and Web Servers, .htaccess is a
feature of Linux/Apache web servers." Very helpful!

Does that mean I can't create 301 redirects? If not, then will the
following
ASP code be just as effective?

%@ Language=VBScript %
%
response.status="301 moved permanently"
Response.AddHeader "Location", "http://www.domain.com/file-location.html"
%
I've done what I assume is the equilevent in php and it works for me.

To check to see if it works check the response here
http://www.searchengineworld.com/cgi...ervercheck.cgi

It SHOULD read:

Server Response: http://www.yourdomain.com
Status: HTTP/1.1 301 Moved Permanently
Date: Thu, 10 Jun 2004 11:39:07 GMT
Server: Apache/1.3.27 (Unix) mod_layout/3.2 PHP/4.3.3 mod_ssl/2.8.11
OpenSSL/0.9.7a
X-Powered-By: PHP/4.3.3
Location: http://www.301-to-here.com
Keep-Alive: timeout=15, max=100
Connection: Keep-Alive
Transfer-Encoding: chunked
Content-Type: text/html

Obviously the server line will be different.





Reply With Quote
  #3  
Old   
wlodi
 
Posts: n/a

Default Re: 301 redirect not available on my server, other options? - 06-10-2004 , 07:59 AM



Quote:
Does that mean I can't create 301 redirects? If not, then will the
following
ASP code be just as effective?
try this as well: http://www.webmasterworld.com/forum23/1167.htm

Michal




Reply With Quote
  #4  
Old   
Chris Michael
 
Posts: n/a

Default Re: 301 redirect not available on my server, other options? - 06-10-2004 , 01:08 PM



"Chris Michael" <news (AT) intomobiles (DOT) com> wrote

Quote:
| I'm trying to create a few 301 redirects using a .htaccess file, but
| they don't seem to be working. I've contacted my web hosting company
| and they replied with "Our servers run Microsoft OS and Web Servers,
| .htaccess is a feature of Linux/Apache web servers." Very helpful!
|
| Does that mean I can't create 301 redirects? If not, then will the
| following ASP code be just as effective?
|
| <%@ Language=VBScript %
| <%
| response.status="301 moved permanently"
| Response.AddHeader "Location",
| "http://www.domain.com/file-location.html" %
Thanks Sven and wlodi.

--
Chris Michael
www.INTOmobiles.com
Free ringtones/logos
Free mobile alerts
3 months free insurance




Reply With Quote
  #5  
Old   
Edward Alfert
 
Posts: n/a

Default Re: 301 redirect not available on my server, other options? - 06-10-2004 , 05:00 PM



"Martin Hagstrøm" <mha (AT) NOSPAM (DOT) altavista.net> wrote in
news:40c8c7eb$0$152$edfadb0f (AT) dread11 (DOT) news.tele.dk:

Quote:
"Sven" <jimmy (AT) nospam (DOT) invalid.sorry> skrev i en meddelelse
news:exYxc.42$964.32 (AT) newsfe3-gui (DOT) ..


I've done what I assume is the equilevent in php and it works for me.

To check to see if it works check the response here
http://www.searchengineworld.com/cgi...ervercheck.cgi

It SHOULD read:

Server Response: http://www.yourdomain.com
Status: HTTP/1.1 301 Moved Permanently
Date: Thu, 10 Jun 2004 11:39:07 GMT
Server: Apache/1.3.27 (Unix) mod_layout/3.2 PHP/4.3.3 mod_ssl/2.8.11
OpenSSL/0.9.7a
X-Powered-By: PHP/4.3.3
Location: http://www.301-to-here.com
Keep-Alive: timeout=15, max=100
Connection: Keep-Alive
Transfer-Encoding: chunked
Content-Type: text/html

And that's precisely the problem with php!
You're missing this line:
Last-Modified: Mon, 31 May 2004 10:44:50 GMT

Since php is per definition dynamic you won't get the "Last-Modified"
parameter - unless you do some extra coding. The result is that you
have disabled your visitors' browsers' cache.

It was for this very reason I dropped php-redirect and used .htaccess
instead.


--
/Martin Hagstrøm
www.PageRank.dk

Hey, if you want to be even more determined to disable the client's browser
cache as well as any proxy caches, then do the follow...

// Date in the past
header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
// Always modified
header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT");
// HTTP/1.1
header("Cache-Control: no-store, no-cache, must-revalidate");
header("Cache-Control: post-check=0, pre-check=0", false);
// HTTP/1.0
header("Pragma: no-cache");


--
Edward Alfert
http://www.rootmode.com/
Multiple Domain Hosting and Reseller Hosting Plans
Coupon Code (Recurring $5/month Discount): newsgroup



Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.