No internet connection
  1. Home
  2. Ideas / Feature Requests

Rewrite all links that match a pattern and/or combine files

By Dimitris @dimkasta2019-03-09 20:06:22.545Z

I like the rewrite url feature, but it gets cumbersome after a while, especially if you use many plugins.

It would be nice to be able to use patterns in the url replacement, something like

*.js , js/{filename}.js
*.css , style/{filename}.css
*.jpg , images/{filename}.jpg

To take it a step further, it would be nice to combine all css or js files and minify them. This would further increase speed and would also overcome the danger of filename conflicts.
For images, some kind of renaming would be needed though

Thanks for a nice plugin

  • 1 replies
  1. Leon Stafford @leonstafford2019-03-28 08:53:08.154Z

    Hi @dimkasta,

    Sorry for the late reply.

    More flexibility in the rewriting coming soon.

    For minification and concatenation, it will be best to use a dedicated plugin, such as Autoptimize/Fast Velocity Minimize. These work well with WP2Static now, but you may need to adjust settings depending on the source your theme/plugins generate.