Jeremy Newman : I've discovered a different way of doing URL rewrites

Jeremy Newman jnewman at winehq.org
Wed Mar 18 14:16:19 CDT 2009


Module: website
Branch: master
Commit: 851c9a8cc8766a2db1a27b0f0f10a675f2d0212a
URL:    http://source.winehq.org/git/website.git/?a=commit;h=851c9a8cc8766a2db1a27b0f0f10a675f2d0212a

Author: Jeremy Newman <jnewman at codeweavers.com>
Date:   Wed Mar 18 14:15:19 2009 -0500

I've discovered a different way of doing URL rewrites
the benefit is that this way does not generate lines in the apache error
log

---

 README                  |    6 ++----
 include/htaccess.sample |    7 +++----
 2 files changed, 5 insertions(+), 8 deletions(-)

diff --git a/README b/README
index 3ed65c2..70707bc 100644
--- a/README
+++ b/README
@@ -16,10 +16,8 @@ Setting Up.
     iow, if you have the site as http://www.example.com/winehq_org/
     then Rewritebase /winehq_org/
     otherwise if this site is the root, leave Rewritebase /
-3. change last rule RewriteRule ^(.+) /site/$1 to have same path as above, leaving in /site/.
-    i.e. RewriteRule ^(.+) /winehq_org/site/$1 if using subdir
-4. cp include/winehq.conf.sample include/winehq.conf
-5. edit include/winehq.conf
+3. cp include/winehq.conf.sample include/winehq.conf
+4. edit include/winehq.conf
 
 Templates.
 --------------
diff --git a/include/htaccess.sample b/include/htaccess.sample
index a060034..7ca021d 100644
--- a/include/htaccess.sample
+++ b/include/htaccess.sample
@@ -107,7 +107,6 @@ RedirectMatch ^/wineconf/$                      http://wiki.winehq.org/
 # Enable re-writing of URLs to hide the main script
 RewriteEngine on
 Rewritebase /
-RewriteRule ^site - [L]
-RewriteRule ^bin - [L]
-RewriteRule \.(html|jpg|gif|png|css|js|xml|swf|flv)$ - [L]
-RewriteRule ^(.+) /site/$1 [L]
+RewriteCond %{REQUEST_FILENAME} !-f
+RewriteRule ^(.+) site/$1 [L]
+




More information about the wine-cvs mailing list