Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.Sign up
Option to use a static HTML file instead of the hardcoded MUDURL redirect. #1273
This PR adds a configuration option 'index_html_file' which is commented out by default in mushcnf.dst. Setting the option to the path name of a static HTML file (game/txt/index.html by default) allows the game to use it as the default response for HTTP requests instead of the hardcoded redirect to MUDURL. If the option is blank or the file does not exist, we fall back to the original hardcoded redirect page. This uses the existing fcache_*() functions that are already used to load and serve up files like connect.txt/connect.html. This allows a game administrator to use a nicer redirect page or serve a small index.html for a web client that loads additional assets from the main website.
Here is an example in action with a custom index.html that loads the MUSH Portal web client. You can either point your favorite MUSH client to node.grapenut.org:8000 like normal, or point your browser to http://node.grapenut.org:8000 to the get custom index.html that loads all of the web client assets from the public mushportal.com server.