This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env python | |
| # | |
| # usage: | |
| # conv2vmx-ovf.py some-vm.ovf | |
| # | |
| # ref: http://www.cnblogs.com/eshizhan/p/3332020.html | |
| # | |
| import sys | |
| fn = sys.argv[1] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| RewriteEngine On | |
| # Set locale cookie if lang query string is set (90 days expiry time) | |
| RewriteCond %{QUERY_STRING} lang=(.*) | |
| RewriteRule .* ?locale=%1 [cookie=locale:%1:.%{HTTP_HOST}:129600:/] | |
| # Append locale to query string if: | |
| # - Query string hasn't already been rewritten | |
| # - Locale cookie is set | |
| # - Request URI isn't a valid file (for assets etc.) |
OlderNewer