Forum Moderators: coopster

Message Too Old, No Replies

ASP to Apache solutions

What are my options?

         

jdancing

9:22 pm on Feb 5, 2009 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I am moving from an old classified script that is ASP based to an apache server so I can run PHP based vbclassifieds and vbulletin moving forward.

I definitely want to archive all my old classifieds to keep the content in these ads that was built up over years. However, all of the classifieds have .asp extensions - for example: [mydomain.com...]

I am thinking of converting all of these pages to html that are structured something like -
[mydomain.com...] and doing 301 redirects.

The problem is I would need to do 30,000+ redirects. Is there some type of pattern based .htaccess command I could write to cover all the 301s with a line or two of code?

If not possible with .htaccess magic, maybe something could be done with an on page 301 redirects?

I want to avoid loading some type of asp for apache software to my server which I heard does not work well and can crash a server. But if that's my only option, I would like to know before I start so I can plan this move out properly.

Ideas anyone?

g1smd

9:35 pm on Feb 5, 2009 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Err. Using a rewrite (that's a rewrite, not a redirect) you can advertise the same URLs that you have always used, and use whatever filename conventions and scripting you like internally in the server.

URLs are the names of stuff "as seen from the web". You don't have to use the same names internally. A rewrite using ModRewrite (RewriteRule) can "translate" between the two. I have .php named files, that have PHP scripts inside, but which are accessed from the web using .asp URLs, for example.

If you insist on using all new URLs for this content, then you can do just such a redirect, and ModRewrite (RewriteRule) is just the tool for the job.

In fact, there are only minor differences in the code used with RewriteRule for a rewrite and a redirect. The question is whether you really want to change the URLs for the content. I would continue with the old URL format.

jdancing

1:49 am on Feb 8, 2009 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I would love to use the old format but I can't because they are ASP pages and I am moving to an Apache server without ASP. Suggestions on getting the ASP pages to show up on my server are welcome.

So a modrewrite rule can be done that will be able to rewrite any of the 30,000 pages on the fly?

Maybe this should have been posted in the .htaccess forum?

Thanks!

g1smd

1:52 am on Feb 8, 2009 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



*** I would love to use the old format but I can't because they are ASP pages and I am moving to an Apache server without ASP. Suggestions on getting the ASP pages to show up on my server are welcome. ***

Using a rewrite (that's a rewrite, not a redirect) you can advertise the same URLs that you have always used, and use whatever filename conventions and scripting you like internally in the server. So you could have a PHP script delivering the content, but still use .asp URLs to access that content. No-one needs to know that you changed to different technology inside the server. URLs are a Resource Locator, used to find stuff on the web. The user of a URL cares nothing about what type of server or what type of script delivered that content. In fact URLs are designed to be platform independant. Any server can send a GIF image out (but it will always have a URL that ends .gif), and any server can send a page of HTML out. For HTML the URL extension can be anything you like, or omitted, as it is the MIME type that announces what type of file is being sent. How that file was built does not matter.

jdMorgan

2:33 am on Feb 8, 2009 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Note that almost all URLs for WebmasterWorld pages end with ".htm"

However almost none of those pages exist as files ending in .htm -- They are actually produced by .cgi scripts.

URLs are used on the Web. Filepaths and filenames are used inside servers. They need not even resemble each other. Servers translate URLs to filenames; That is actually their primary job.

Jim

jdancing

3:49 pm on Feb 8, 2009 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Great info. I knew the gurus here would know the best answer. Now that I know what needs to be done I can tell my developers what they should do and sound like I know what I am talking about. ;-)