1. Redirect all files in a directory
Add these contents into the ".htaccess" file under your directory.
##################
RewriteEngine On
RewriteCond %{HTTPS} !on
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI}
##################
Then:
"http://domain/dir/a.php" will redirect into "https://domain/dir/a.php",
"http://domain/dir/b.php" will redirect into "https://domain/dir/b.php",
"http://domain/dir/c.php" will redirect into "https://domain/dir/c.php".
2. Redirect a single file in a directory
Add these contents into the ".htaccess" file under the directory containing your file.
##################
<FilesMatch "^login\.php$">
RewriteEngine On
RewriteCond %{HTTPS} !on
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI}
</FilesMatch>
##################
Then:
"http://domain/dir/login.php" will redirect into "https://domain/dir/login.php"
"http://domain/dir/other_files.php" will not redirect.
--
from my gmail
20100912
20100909
[test] Write blog with html email
This is a HTML Email.
[IMG src="defined"]
[/IMG]
[IMG src="gmail_smile"]
[/IMG]
abc normal
abc link
[IMG src="defined"]
[IMG src="gmail_smile"]
- abc
- abc
- abc
- abc
- abc
- abc
Indent on
Indent offabc normal
abc center
abc normalabc right
abc normalabc link
20100422
Change from opensvn.csie.org to code.google.com
1. Create a new project in google code.
2. Reset the Subversion repository to revision 0.
Find the "Reset Subversion Repository" link at the bottom of the "Source" tab.
3. Sync between two svn host. Init first, then sync.
Ref:
(1) Importing Subversion Repositories to Google Code
http://therightstuff.de/CommentView,guid,b984a8e7-e94d-4eed-a705-5dc479f959e8.aspx
(2) 將 Subversion Repository 搬進 Google Code 裡面
http://fourdollars.blogspot.com/2009/08/subversion-repository-google-code.html
2. Reset the Subversion repository to revision 0.
Find the "Reset Subversion Repository" link at the bottom of the "Source" tab.
3. Sync between two svn host. Init first, then sync.
$ svnsync init https://xiaomao101.googlecode.com/svn/ https://opensvn.csie.org/xiaomao101/ --username ant101tna
Authentication realm: Google Code Subversion Repository
Password for 'ant101tna':
Copied properties for revision 0.
$ svnsync sync https://xiaomao101.googlecode.com/svn/ --username ant101tna
Transmitting file data .
Committed revision 1.
Copied properties for revision 1.
Committed revision 2.
Copied properties for revision 2.
Transmitting file data ... Ref:
(1) Importing Subversion Repositories to Google Code
http://therightstuff.de/CommentView,guid,b984a8e7-e94d-4eed-a705-5dc479f959e8.aspx
(2) 將 Subversion Repository 搬進 Google Code 裡面
http://fourdollars.blogspot.com/2009/08/subversion-repository-google-code.html
How to dump svn from Free SVN Host
1. Download rsvndump
2. Install rsvndump
3. Dump the web to local dump file.
4. Create a new repository and load the dump file to it.
$ wget [from sourceforge.net]2. Install rsvndump
$ ./configure
(If getting error, install the missing package, some times like libsvn-dev or libapr1-dev, just some dev package)
$ make
$ make install3. Dump the web to local dump file.
$ rsvndump https://opensvn.csie.org/xiaomao101/ > csie_xiaomao101.dumpfile4. Create a new repository and load the dump file to it.
$ svnadmin create new_repo_dir
$ svnadmin load new_repo_dir <>
20100421
Install Eclipse with Android Development Tools (ADT) plugin in Ubuntu
1. Install Eclipse main program
2. Setup plugin source of Eclipse
Note: Ubuntu default Eclipse installation with no source in [Menu->Help->Install New Software]
(1) Add Eclipse source:
(2) Add Android source:
3. Install ADT
...
Ref:
(1) 3. Install the ADT Plugin for Eclipse
http://developer.android.com/sdk/index.html
(2) requires 'org.eclipse.gef 0.0.0' but it could not be found
https://bugs.launchpad.net/ubuntu/+source/eclipse/+bug/482244
$ sudo apt-get install eclipse
2. Setup plugin source of Eclipse
Note: Ubuntu default Eclipse installation with no source in [Menu->Help->Install New Software]
(1) Add Eclipse source:
Name: Eclipse - galileo
Location: http://download.eclipse.org/releases/galileo
(2) Add Android source:
Name: Android Development Tools (ADT)
Location: https://dl-ssl.google.com/android/eclipse/
3. Install ADT
...
Ref:
(1) 3. Install the ADT Plugin for Eclipse
http://developer.android.com/sdk/index.html
(2) requires 'org.eclipse.gef 0.0.0' but it could not be found
https://bugs.launchpad.net/ubuntu/+source/eclipse/+bug/482244
20100420
订阅:
博文 (Atom)