Tag Info

Hot answers tagged

2

Yes, it works the same. x509v3 includes Subject Alternative Name. Most (all?) issuing CA's will list both www.example.com and example.com as equivalent alternate names in a cert requested for either. Because of this browsers won't choke on the name when using the same cert in both VirtualHost instances. On a different note, you have: Redirect 301 / ...


1

Just use an HTTP redirect, e. g. with RedirectPermanent or more dynamically with RedirectMatch: RedirectPermanent /productA/jump_index.html http://example.com/productA/index.html RedirectMatch permanent \/(product.*)\/jump_index\.html http://example.com/$1/index.html


1

Define separate log file used if there is environment variable: #Set your own file path and log file format CustomLog /var/log/apache/redirects.log common env=redirected Set this variable near every redirect (RedirectMatch or mod_rewrite, etc.): SetEnvIf Request_URI "^/site" redirected=1 RedirectMatch ^/site/(.*)$ http://target.example.com/$1 You can ...


1

You cannot. Redirect is able to handle simple redirections, where you're sending the client to a single, specific name, but does not have the ability to do complex substitutions (setting aside the fact that %{HTTP_HOST} is mod_rewrite-specific). Just stick with mod_rewrite. mod_alias isn't capable of doing what you need.


1

I wrote the following condition that I'm using in an .htaccess file for redirecting any domain without the "www", this work for any domain name. The domain look could be done more comprehensive, for instance I only look for number, letters and underscore in the domain name since I know all the domains where this rule will apply will have just that, but you ...



Only top voted, non community-wiki answers of a minimum length are eligible