How do I make a mock CDN htaccess?

  • 0
    Is it possible with htaccess to rewrite the file path like this:

    The path that we assign to the file is cdn.compa.ny / image / bg.jpg
    The real path to the file is /assets/images/bg.jpg

    Provided that the link to the CDN must not exist.

    Something like this:
    RewriteEngine On
    RewriteBase /
    RewriteRule http://cdn.compa.ny/(.*)$ /assets/$1 [L, QSA]
    htaccess Everett Gallagher, Dec 7, 2019

  • 0 Answers
Your Answer
To place the code, please use CodePen or similar tool. Thanks you!