I have a localhost environment and a test server environment. I write all my code locally and on occasion push the changes to the testing server. My code needs to be intelligent enough to know where it is being run so that it can call on appropriate url (local or test).
my local environment URL is “my.local” and test environment url is “test.somedomain.com”
I need to be able to set a baserewrite or something that adjusts itself according to the url the code is on.
Any help?
If you have set up your
virtualhost&DocumentRootAll you have to do for your documentroot is:
in your per directory
.htaccessresiding in yourDocumentRoot.For other folders, you will have to set up an
Alias(Context: server config, virtual host), amod_aliasdirective.And use
RewriteBasedirective in your per directory.htaccessExample from:
RewriteBase: