Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

SEO Tycoon


You are currently viewing our SEO Tycoon as a guest. Please register to participate.
Login



Freelance Jobs

Reply
301 redirect for *.asp files
Old 04-09-2008, 07:37 AM 301 redirect for *.asp files
Experienced Talker

Posts: 39
Trades: 0
Hi

I have just moved a very large ASP coded online shop into a new php online shop.

I have directed the .asp main categories to the proper .php file using 301 redirects.

Is there a quick way I can 301 re-direct all other (*.asp) files to say my all_products.php page?

Cheers

p9
69me is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 04-09-2008, 02:15 PM Re: 301 redirect for *.asp files
chrishirst's Avatar
Missing! presumed drunk.

Posts: 42,385
Name: Chris Hirst
Location: Blackpool. UK
Trades: 0
Code:
<%
response.status = "301 Moved Permanently"
response.addheader "Location","http://new_uri"
response.end
%>
__________________
Chris. ->>
Please login or register to view this content. Registration is FREE
<<-

A foolish consistency is the hobgoblin of little minds
Thought for today:- Is SEO the only industry where all the cowboys are Indians?
chrishirst is offline
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Old 04-09-2008, 03:52 PM Re: 301 redirect for *.asp files
ForrestCroce's Avatar
Half Man, Half Amazing

Posts: 3,023
Name: Forrest Croce
Location: Seattle, WA
Trades: 0
Are you changing all the page and folder names? If they'll be the same, you might consider an internal redirect, so the url doesn't change as far as the outside world is concerned, but the server parses asp files as if they were php?
__________________

Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
ForrestCroce is offline
Reply With Quote
View Public Profile Visit ForrestCroce's homepage!
 
Old 04-09-2008, 09:31 PM Re: 301 redirect for *.asp files
nyef's Avatar
Ultra Talker

Posts: 265
Name: Lucas
Trades: 0
Code:
<%
if lcase(right(request.servervariables("SCRIPT_NAME"),4))=".asp" then
  response.redirect "/all_products.php"
end if
%>
nyef is offline
Reply With Quote
View Public Profile Visit nyef's homepage!
 
Old 04-10-2008, 04:09 AM Re: 301 redirect for *.asp files
Experienced Talker

Posts: 39
Trades: 0
sorry...im on a linux server now so cannot process asp code as suggested above.

It's really a 301 / htaccess solution I'm looking for if possible...

cheers

p9
69me is offline
Reply With Quote
View Public Profile
 
Old 04-10-2008, 05:32 AM Re: 301 redirect for *.asp files
chrishirst's Avatar
Missing! presumed drunk.

Posts: 42,385
Name: Chris Hirst
Location: Blackpool. UK
Trades: 0
Quote:
sorry...im on a linux server now so cannot process asp code as suggested above.
It's always handy to know these things

@nyef;
Using response.redirect in ASP sends a 302 response to the user agent not a 301.

Apache & .htaccess is not my forte but;

Code:
RedirectMatch 301 *.asp http://www.example.com/pagename.php
should work I think.
__________________
Chris. ->>
Please login or register to view this content. Registration is FREE
<<-

A foolish consistency is the hobgoblin of little minds
Thought for today:- Is SEO the only industry where all the cowboys are Indians?
chrishirst is offline
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Reply     « Reply to 301 redirect for *.asp files
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.35038 seconds with 12 queries