Apache Rewrite


more Apache stuff… need a /callback route in a node-based PWA (edit: SPA, maybe. Is it still a “single-page app” if you need a second route for auth?) to “pass through” the Apache server; rewrite rule took me a while to figure out, and it still requires the trailing slash, which is fragile. Not sure this is best, but it works.

<Directory /var/www/dashboard/build >
    Options Indexes FollowSymLinks MultiViews
    AllowOverride none
    RewriteEngine On
    RewriteBase /
    RewriteCond %{REQUEST_URI} callback(.+)
    RewriteRule ^ $1 [L]
</Directory>

And after making my edit above, re: SPAs, it occurs to me I could’ve maybe routed it without a truly separate /callback path… it could just provide a querystring at the end of the bare domain… hm.

(further update: sorry if this pops up again in RSS. I’m giving it a title so my blog thinks of it as a “real” post, not just a microblog tweet-type post.)

This entry was posted on May 01, 2019 with tags

colorshare.club