Sure, the 301 redirect in PageBlaster can check the incoming URL, and because of the way it is implemented in a declarative way you can also use any number of other request properties to do your redirect (or even respond differently because of the text in the page). This gives you all the same flexibility that you would have if you could write server side code.
The actual page does not have to exist for Portal Rules in PageBlaster to check the Requested Url because the engine behind PageBlaster is an HttpModule.
To check 200 Urls you can probably combine a lot of them together using a Regular expression to match the Url and do your redirect. Since the feature is implemented the way it is you can grab portions of the old Url and use them in the Response.Location part of the rule.
Your idea for the simple rule expression you show as an example is actually very close to how the virtual-path is done in PageBlaster. If you look at the DesktopModules/Snapsis?PageBlaster/Config/RespourceLocationTable.config file after adding a virtual path you will see what I mean.
That implementation does not allow 301 redirects though, it does a rewrite of the requested Url inside the application without redirecting.
If I were to do something simple like that for 301 redirects, how would you suggest it be entered in the interface?
Maybe with a more simple line that can be used in the SearchFor field something like this?:
[PB:Redirect(type, from, to)] That would give the ability to do 301 or 302 redirects in one line of code. For right now it is only a few more lines that can be easily copied and pasted though. You could even put several in one rule like that other thread explained. [PB: IF( Match("[PB:Request.Url]","OldPage1.aspx") ) {
[PB: Response.Status("301 Moved Permanently") ]
[PB: Response.AddHeader("Location","http://www.yourdomain.com/NewPage1.aspx") ]
[PB: Response.End() ]
} ] [PB: IF( Match("[PB:Request.Url]","OldPage2.aspx") ) {
[PB: Response.Status("301 Moved Permanently") ]
[PB: Response.AddHeader("Location","http://www.yourdomain.com/NewPage2.aspx") ]
[PB: Response.End() ]
} ] [PB: IF( Match("[PB:Request.Url]","OldPage3.aspx") ) {
[PB: Response.Status("301 Moved Permanently") ]
[PB: Response.AddHeader("Location","http://www.yourdomain.com/NewPage3.aspx") ]
[PB: Response.End() ]
} ] [PB: IF( Match("[PB:Request.Url]","OldPage4.aspx") ) {
[PB: Response.Status("301 Moved Permanently") ]
[PB: Response.AddHeader("Location","http://www.yourdomain.com/NewPage4.aspx") ]
[PB: Response.End() ]
} ] [PB: IF( Match("[PB:Request.Url]","OldPage5.aspx") ) {
[PB: Response.Status("301 Moved Permanently") ]
[PB: Response.AddHeader("Location","http://www.yourdomain.com/NewPage5.aspx") ]
[PB: Response.End() ]
} ] |