问题
So, I've been developing my first actual site and so far I've been developing it on a local webserver, Apache Tomcat 7.0 along with a MySQL server, and I'm wondering what changes or problems I should be expecting when I go from that testing environment to a live VPN web server which I've been told I'll have to switch over to.
If it makes any difference I'm using struts2 for my action mapping which I've noticed append all my URL's with .action
ex: localhost:8080/pm/random.action
However the expected url is, busniessname.com/pm/random
So the tl;dr, what should I be expecting when I switch from a local testing environment to the live website and what should I do to fix the URL's?
回答1:
You should do nothing, the urls without .action
extension should work by default. If you would like to use an empty extension only then you should set the property to the configuration.
<constant name="struts.action.extension" value=",,"/>
来源:https://stackoverflow.com/questions/17391423/going-from-a-local-testing-environment-to-live-site