21491 Posts in 5783 Topics by 2621 members
General Questions
SilverStripe Forums » General Questions » How to catch old ASPX url and forward to SS Site Page?
General questions about getting started with SilverStripe that don't fit in any of the categories above.
Moderators: martimiz, Howard, Sean, Ryan M., biapar, Willr, Ingo, swaiba, simon_w
|
Page:
1
|
Go to End | |
| Author | Topic: | 1057 Views |
-
How to catch old ASPX url and forward to SS Site Page?

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
-
Re: How to catch old ASPX url and forward to SS Site Page?

7 December 2010 at 5:01am Last edited: 7 December 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] -
Re: How to catch old ASPX url and forward to SS Site Page?

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
-
Re: How to catch old ASPX url and forward to SS Site Page?

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.
-
Re: How to catch old ASPX url and forward to SS Site Page?

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.
| 1057 Views | ||
|
Page:
1
|
Go to Top |




