README.md in capistrano-simple-htaccess-0.1.1 vs README.md in capistrano-simple-htaccess-1.0.0
- old
+ new
@@ -36,20 +36,32 @@
```apache
<IfModule mod_rewrite.c>
Options +FollowSymLinks
RewriteEngine On
- RewriteCond %{REQUEST_URI} !/current/
- RewriteRule ^(.*)$ current/$1 [L]
+ RewriteBase "%<base>s"
+ RewriteRule ^current(.*) %<base>s$1 [NC,R,END]
+ RewriteRule ^((?!current/).*)$ current/$1 [NC,END]
</IfModule>
```
+The `%<base>s` template strings are replaced with the value of your `:deploy_to` directory, with the `:document_root` variable removed from the string's prefix. This creates a base directory string.
+
+Ex:
+
+```ruby
+set :deploy_to, '/var/www/html/example1/public'
+set :document_root, '/var/www/html'
+
+# %<base>s would then be replaced with: /example1/public
+```
+
## Configuration
If you want a different .htaccess uploaded, just change the `:HTACCESS` variable as part of your deploy config. Ex:
```ruby
-set(:HTACCESS), <<HTACCESS
+set :HTACCESS, <<HTACCESS
# Put your .htaccess config here
HTACCESS
```
## Contributing