![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
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" % |
#3
| |||
| |||
|
|
Does that mean I can't create 301 redirects? If not, then will the following ASP code be just as effective? |
#4
| |||
| |||
|
|
| 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" % |
#5
| |||
| |||
|
|
"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 |
![]() |
| Thread Tools | |
| Display Modes | |
| |