Contact Us Forum Rules Search Archive
WebProWorld Part of WebProNews.com
Page One Link To Us Edit Profile Private Messages Archives FAQ RSS Feeds  
 

Go Back   WebProWorld > Webmaster, IT and Security Discussion > Web Programming Discussion Forum
Subscribe to the Newsletter FREE!


Register FAQ Members List Calendar Arcade Chatbox Mark Forums Read

Web Programming Discussion Forum Working with an API? Developing a plugin? Writing a Mod or script for your favorite blog, Web 2.0 site or Forum? Welcome.

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 11-16-2007, 02:54 AM
ldylion214's Avatar
WebProWorld Pro
 

Join Date: Mar 2004
Location: Tucson, AZ
Posts: 268
ldylion214 RepRank 0
Default .htaccess file type for .asp

I've been told a .htaccess file won't work on my site because it is .asp. What would be an alternative that would work for me. I have an old javascript code for redirect Would something like this work to redirect my //tribeazure.com to //www.tribeazure?

or Would either of these work?

ASP Redirect
<%@ Language=VBScript %>
<%
Response.Status="301 Moved Permanently";
Response.AddHeader("Location","http://www.new-url.com/");
%>


ASP .NET Redirect
<script runat="server">
private void Page_Load(object sender, System.EventArgs e)
{
Response.Status = "301 Moved Permanently";
Response.AddHeader("Location","http://www.new-url.com");
}
</script>

I'm trying to find this on my own. If this should be somewhere else, let me know. I'll post it where it needs to go.

Thanks in advance!
Nicci
__________________
Nicci VanCleave
Custom Native American Jewelry
Reply With Quote
  #2 (permalink)  
Old 11-16-2007, 09:10 AM
kgun's Avatar
WebProWorld 1,000+ Club
 

Join Date: May 2005
Location: Norway
Posts: 5,402
kgun RepRank 3kgun RepRank 3kgun RepRank 3
Default Re: .htaccess file type for .asp

I assume that you are on an MS Internet Information Web Server (IIS)

KW search:

"iis rewrite"

"iis redirect"

Last edited by kgun : 11-16-2007 at 09:13 AM.
Reply With Quote
  #3 (permalink)  
Old 11-16-2007, 10:07 AM
Dubbya's Avatar
WebProWorld 1,000+ Club
 

Join Date: Nov 2006
Location: Steinbach, Manitoba, Canada
Posts: 1,396
Dubbya RepRank 3Dubbya RepRank 3Dubbya RepRank 3
Default Re: .htaccess file type for .asp

You're right on the money Nicci,

Replace everything on the page you want the redirect from with the following snippet. Just change the URL to the name and location of the page you want to bounce traffic to and you're all set.

Code:
<%@LANGUAGE="VBSCRIPT"%>
<%
Response.Status="301 Moved Permanently"
Response.AddHeader "Location", "http://www.yoursiteandurl/thepagename.asp"
Response.End     '(this line is optional.)
%>
Alternatively, you can do this manually if you have access to the IIS server configuration interface.

Microsoft Corporation
__________________
Printer ink, inkjet & toner cartridges in Canada
"Price-wise printing supplies"
inkjetOasis.ca
Reply With Quote
  #4 (permalink)  
Old 11-17-2007, 12:46 AM
ldylion214's Avatar
WebProWorld Pro
 

Join Date: Mar 2004
Location: Tucson, AZ
Posts: 268
ldylion214 RepRank 0
Default Re: .htaccess file type for .asp

This is for a redirect from //tribeazure.com to //www.tribeazure. Will that work the same?

Thanks! Nicci
__________________
Nicci VanCleave
Custom Native American Jewelry
Reply With Quote
  #5 (permalink)  
Old 11-19-2007, 12:09 PM
Dubbya's Avatar
WebProWorld 1,000+ Club
 

Join Date: Nov 2006
Location: Steinbach, Manitoba, Canada
Posts: 1,396
Dubbya RepRank 3Dubbya RepRank 3Dubbya RepRank 3
Default Re: .htaccess file type for .asp

Your host will be able to hook that up easy, peasy!!

That's just a simple configuration under IIS where both URLS resolve to the same domain.

IIS Answers - DNS Basics for IIS Administrators

Hope this helps.
__________________
Printer ink, inkjet & toner cartridges in Canada
"Price-wise printing supplies"
inkjetOasis.ca
Reply With Quote
  #6 (permalink)  
Old 11-19-2007, 08:51 PM
ldylion214's Avatar
WebProWorld Pro
 

Join Date: Mar 2004
Location: Tucson, AZ
Posts: 268
ldylion214 RepRank 0
Default Re: .htaccess file type for .asp

Quote:
Originally Posted by Dubbya View Post
Your host will be able to hook that up easy, peasy!!

That's just a simple configuration under IIS where both URLS resolve to the same domain.

IIS Answers - DNS Basics for IIS Administrators

Hope this helps.
Thank you so much. I asked them about it and I only got the code above. I will write them and tell them this is what Ineed.
Best, Nicci
__________________
Nicci VanCleave
Custom Native American Jewelry
Reply With Quote
Reply

  WebProWorld > Webmaster, IT and Security Discussion > Web Programming Discussion Forum


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
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
.htaccess file type for .asp ldylion214 Search Engine Optimization Forum 23 12-02-2007 12:41 AM
help regarding .htaccess file SES Trims Search Engine Optimization Forum 1 12-26-2006 08:48 PM
help regarding .htaccess file SES Trims Google Discussion Forum 3 12-08-2006 06:59 PM
site gone .htaccess file AjiNIMC Web Programming Discussion Forum 4 10-23-2004 12:07 AM
.htaccess File Good Or Bad? myvv Search Engine Optimization Forum 3 09-27-2004 05:16 PM


Search Engine Optimization by vBSEO 3.2.0