Solar Charge Controller as "UPS"?
Yes, you can use a standard solar charge controller as a battery UPS. You need to feed it a DC voltage within the proper range (and it really needs to be a pretty clean voltage - minimal ripple).

If you are using it to power your router, there is another issue you need to be aware of. Lead Acid batteries (wet, gel &amp; AGM) have a voltage profile. i.e. at 12V battery is not really 12V. A good MPPT charge controller will match it's charging profile to the needs of a batter which may range as low as 11.2V before it turns the load off and as high as 15V when fully charged. In a 24V system, that means your battery will almost always be fully charged and floating around 29.7 - 30V. The charge controller will simply put that voltage out on the load terminals unless it has a built in Voltage regulator. You may need to add a regulator to your system. I recommend the set point on this regulator be below your cutoff voltage (10.5V or 21V) and make sure it's input will handle the highest battery voltage (15V or 30V)

You basically end up with a 3 part system 1) AC-to-DC converter for input 2) Solar charge controller, and 3) Load regulator.

It may be cheaper to buy a purpose built UPS and just put a bigger battery on it.