Scale up as you grow — whether you're running one virtual machine or ten thousand.

From GPU-powered inference and Kubernetes to managed databases and storage, get everything you need to build, scale, and deploy intelligent applications.

Hi lads,
I’m in need of some help with a tricky Apache rewrite situation I’m facing. I have multiple subdomains and subdirectories with various access requirements, and I want to create a rewrite rule that satisfies a couple of conditions.
Basically, if :
subdomain.example.com/files/..pdf or .jpg.public_ prefix.If all the above conditions are met, the request should be redirected to a separate domain https://public-files.example.net/.
I’ve tried the following rewrite rule:
RewriteEngine On
RewriteCond %{HTTP_HOST} ^subdomain\.example\.com$
RewriteCond %{REQUEST_URI} ^/files/public_.*\.(pdf|jpg)$
RewriteRule ^/files/public_(.*)\.(pdf|jpg)$ https://public-files.example.net/$1.$2 [R=301,L]
ofcourse with my domains but it doesn’t work. I believe it might be conflicting with other rewrite rules in my configuration.
gerard
Jon Harris
orbitstorm88
rem3n
yolanda smith
301276acdc124dd982fe86364ba8c4
30ddab6038c044188d489290785dcb
699c9bc0a2c34f248e792cb8d2c6ab
Kent Morlan
sylvaticus
agitechcr
8b8f3c8ea96345bf8ddb0a59a008e2