Rewrite Rules

4 posts / 0 new
Last post
#1 Thu, 01/27/2011 - 12:55
clwheatley

Rewrite Rules

How can I add some Apache rewrite rules to be incorporated into new websites' configuration without having to manually add those rules each time I create a domain?

Thanks,

Chris

Thu, 01/27/2011 - 13:56
andreychek

Howdy,

One way to do that would be to add your desired rules to the "Directives and settings for new websites" box in System Settings -> Server templates -> Default -> Apache website. That would then be available to all new Virtual Servers.

Would that do what you're after?

-Eric

Thu, 01/27/2011 - 15:54
clwheatley

I guess my only thought, as I have looked at this before, is whether that would conflict with any of the rewrite rules that are added for the admin.domain.tld and webmail.domain.tld address that go to Webmin and Usermin.

Would that be an issue or would Virtualmin just append whatever it needs to underneath any rules I were to set in the server template?

Chris

Fri, 01/28/2011 - 10:59
andreychek

Well, Virtualmin would continue to add the same rules it is today to each domain that's setup.

So long as what you are adding isn't related to admin.domain.tld or webmail.domain.tld, they shouldn't conflict -- it would be no problem to have multiple redirect rules in your config.

And, if they ever did conflict, you can always tell Virtualmin to stop adding it's own rewrite rules (the option to do that is at the bottom of the Apache Website screen).

-Eric

Topic locked