Instantly share code, notes, and snippets.

Embed
What would you like to do?
nice urls for etherpadlite on apache
RewriteEngine On
RewriteRule /p/*$ http://yourpad.de/ [NC,L]
RewriteCond %{REQUEST_URI} !^/locales/
RewriteCond %{REQUEST_URI} !^/locales.json
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://pad.joeran.de/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]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment