Search code examples
.htaccess

Convert nginx to htaccess


I'm trying to convert the following NGINX rule:

location = /js/index.php/x.js { rewrite ^(.*.php)/ $1 last; }

to .htaccess. I tried:

RewriteRule ^/js/index.php/x.js  ^.*\.php

but it isn't working.


Solution

  • Try with:

    RewriteRule ^(js/index\.php)/x\.js $1