Forum

gCloud Storage rewrite rule

Fred
8 May 2017, 21:11
Hi Guys,

Could I have a little bit of help with this rewrite rule conversion to Hiawatha?
# BEGIN gCloud Storage plugin management
RewriteRule ^gCloud-dispatcher/(.*) /wp-content/plugins/wp-gCloud/gCloud-dispatcher.php?fileKey=$1 [QSA,L]
# END gCloud Storage plugin management

The Full .htaccess file is:
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
# BEGIN gCloud Storage plugin management
RewriteRule ^gCloud-dispatcher/(.*) /wp-content/plugins/wp-gCloud/gCloud-dispatcher.php?fileKey=$1 [QSA,L]
# END gCloud Storage plugin management
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
# END WordPress

Thank you advance
Fred
Fred
8 May 2017, 23:00
This is what I managed so far:
Match ^/\gCloud-dispatcher(\?(.*))? Rewrite /wp-content/plugins/wp-gCloud/gCloud-dispatcher.php?
Hugo Leisink
8 May 2017, 23:24
Match ^/gCloud-dispatcher/(.*)\?(.*) Rewrite /wp-content/plugins/wp-gCloud/gCloud-dispatcher.php?fileKey=$1&$2
Match ^/gCloud-dispatcher/(.*) Rewrite /wp-content/plugins/wp-gCloud/gCloud-dispatcher.php?fileKey=$1

I think it can be done in one rule, but not sure if it's 100% correct. Test carefully.
Match ^/gCloud-dispatcher/([^?]*)(\?(.*))? Rewrite /wp-content/plugins/wp-gCloud/gCloud-dispatcher.php?fileKey=$1&$3
This topic has been closed.