Skip to content

Instantly share code, notes, and snippets.

@shuairan
Created December 23, 2012 22:22
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save shuairan/4366435 to your computer and use it in GitHub Desktop.
Save shuairan/4366435 to your computer and use it in GitHub Desktop.
etherpad-lite uberspace htaccess
# the following allows "nice" urls such as https://etherpad.example.org/padname
RewriteEngine On
RewriteRule p/*$ http://etherpad.example.org/ [NC,L]
RewriteCond %{REQUEST_URI} !^/locales/
RewriteCond %{REQUEST_URI} !^/locales.ini
RewriteCond %{REQUEST_URI} !^/admin
RewriteCond %{REQUEST_URI} !^/p/
RewriteCond %{REQUEST_URI} !^/static/
RewriteCond %{REQUEST_URI} !^/pluginfw/
RewriteCond %{REQUEST_URI} !^/javascripts/
RewriteCond %{REQUEST_URI} !^/socket.io/
RewriteCond %{REQUEST_URI} !^/ep/
RewriteCond %{REQUEST_URI} !^/minified/
RewriteCond %{REQUEST_URI} !^/api/
RewriteCond %{REQUEST_URI} !^/ro/
RewriteCond %{REQUEST_URI} !^/error/
RewriteCond %{REQUEST_URI} !^/jserror
RewriteCond %{REQUEST_URI} !/favicon.ico
RewriteCond %{REQUEST_URI} !/robots.txt
# choose: either redirecting or rewriting:
# Use this for redirecting:
#RewriteRule ^(.+)$ http://etherpad.example.org/p/$1 [L]
# Use this for internal rewriting:
RewriteRule ^(.+)$ /p/$1 [L]
### Here comes the proxy part:
# change the port to your actual configuration:
RewriteRule ^(.*)$ http://localhost:9999/$1 [P]
@shuairan
Copy link
Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment