[asterisk-gui] HTTP Redirect Option

Russell Bryant russell at digium.com
Sat Dec 23 00:06:56 MST 2006


Hey everyone,

I'm really excited about this gui project, and I've been trying to help a little bit in the ways that I can.  One thing that I came across when playing with it is that I got tired of typing out this long URL to get to the gui:

http://localhost:8088/asterisk/static/config/cfgadvanced.html

So, I added a new option to http.conf in Asterisk to allow you to redirect one path to another.  For example, in my http.conf, I have:

; Syntax is redirect=<from here>=<to there>
redirect=/=/asterisk/static/config/cfgadvanced.html

Now, I can just go to http://localhost:8088 and I am brought directly to the gui main page.  The HTTP server just sends a "302 Moved Temporarily" message to accomplish this.

I haven't actually posted this code anywhere yet, but I wanted to go ahead and ask about it on this list to see what others thought about it.  Do you think this is a good idea?  Do you foresee any problems with this approach?

Thanks,

-- 
Russell Bryant
Software Engineer
Digium, Inc.



More information about the asterisk-gui mailing list