Forum Moderators: phranque

Message Too Old, No Replies

Mass redirect old asp pages

         

darkyl

1:25 am on Apr 28, 2008 (gmt 0)

10+ Year Member



Hi,

i have an old asp site that i'm rebuilding using joomla: the old site has about 200 asp pages that rank well on google and i'd like to mantain the good results.

The url of the old site looks like this www.mysite.it/articolo.asp?idarticolo=814.

I use joomla with a sef component: i created an identical article and set the url to appear just the same: articolo.asp?idarticolo=814. The problem is that i get a Server Error 404 : Not Found.

I think that depends on the fact that the apache server has problems interpreting .asp pages.

I thought of several possible solutions but I need help understanding if they would work and how.

1. Tell the Apache server to interpret .asp pages just like .php pages. If this works the above example should show the correct page and not a server error.

2. Use a 301 redirect using htaccess to do a mass redirect, for example articolo.asp?idarticolo=814 would be redirected to articolo814.php. Basically articolo.asp?idarticolo=#*$! ->> articolo#*$!.php

3. Manually put an asp redirect in every page to a new joomla content page (painful).

Would any of these method work? In case i could use method 2, what should i put into .htaccess?

Thanks a lot

jdMorgan

12:42 pm on Apr 28, 2008 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



1) See the AddHandler directive in the Apache core documentation.
2) See Apache mod_rewrite. Use an internal rewrite, not an external redirect. Do not change your on-page links.
3) Ouch! No.

Please see our Apache forum Charter (link at top of this page) for info on how to get the most from this forum.

Jim

darkyl

6:11 pm on Apr 28, 2008 (gmt 0)

10+ Year Member



Thanks jdMorgan,

I'll go with method 2.

It looks like joomla internal sef component has problems generating urls containing ? (question marks), so I can't set "articolo.asp?idarticolo=814" as a page name for a content page. Even if I force the name (in joomla sef component) the page will result in a server error.

Anyway I can set "idarticolo=814" (without articolo.asp?). This would be done when recreating the pages on the new site so it's not a problem.

But what should I put in .htaccess in order to automatically rewrite articolo.asp?idarticolo=814 to idarticolo=814 ?