Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

General Questions /

General questions about getting started with SilverStripe that don't fit in any of the categories above.

Moderators: martimiz, Sean, biapar, Willr, Ingo, swaiba, simon_w

How to catch old ASPX url and forward to SS Site Page?


Reply


5 Posts   1448 Views

Avatar
LinseyM

Community Member, 99 Posts

6 December 2010 at 11:56pm

Hi there,

Just working on a site that is nearing completion & launch. Its running on a newly built windows IIS server. Client just told me that a lot of their previous customers have bookmarked their existing support form, which is located at URL along the lines of "http://www.domain-name.com/Feedback/IncidentSupport.aspx"

They would like this now to forward on to the new support form in SilverStripe. (which is at a http://domain-name.com/contact/support-request/)

Can anyone suggest how I would go about doing this? I don't quite know where to start!

(At the moment I can't even get the SS Error pages running as the IIS error pages seem to be taking precedence... however I have asked their IT person to look at that, so its a whole other issue)

Many thanks in advance guys,

Linsey

Avatar
bartvanirsel

Community Member, 94 Posts

7 December 2010 at 5:01am

Edited: 07/12/2010 5:02am

Hi,

I dont know if IIS supports .htaccess files but if it does you can do this by defining rewrite rules which do this for you:

RewriteCond %{HTTP_HOST} ^http://www.domain-name\.com/Feedback/IncidentSupport\.aspx
RewriteRule ^(.*)$ http://www.domain-name.com/contact/support-request/ [R=permanent,L]

Avatar
Double-A-Ron

Community Member, 604 Posts

7 December 2010 at 10:15am

Not really SS related, this is just a 301 redirect. As Bart says, this is usuall done with .htaccess in Apache, but this isn't available to you in IIS.

Do you have access to the .NET code for the original support form? You could add something like this to the top of the source code for that form only:

< %@ Language=VBScript %>
< %
Response.Status="301 Moved Permanently"
Response.AddHeader "Location", http://domain-name.com/contact/support-request/
%>

Failing that, you will find more info by looking into other methods of "IIS 301 redirect". Since this is not really related to Silverstripe, you'll get a quicker resolution by focussing on IIS. Most of this forum use LAMP stacks.

Aaron

Avatar
ajshort

Community Member, 244 Posts

7 December 2010 at 10:56am

If you can get the 404 error handler to point to the default SilverStripe error page, you could use the link mapping module - https://github.com/ajshort/silverstripe-linkmapping. You can define the redirects in the CMS.

Avatar
LinseyM

Community Member, 99 Posts

8 December 2010 at 1:56am

Thanks... I will ask their IT guy to try and get the 404 handlers working and take it from there.

Never set up SS on a windows box before, def found it much harder than any previous build.

Cheers guys.