I recall seeing this as a feature of a Wordpress Development Framework, so I know it's possible (can't remember the framework). I am interested in how to condense the Wordpress-generated urls to something more concise and not so "Wordpressy".

I'm thinking that I would have to both update the .htaccess and add some kind of filter to alter the path prior to being output to the page.

Here is something along the lines of what I'm looking for:

Current: http://www.domain.com/wp-content/themes/test/assets/css/site.css
Shorter: http://www.domain.com/theme/assets/css/site.css

Current: http://www.domain.com/wp-content/plugins/foo-bar/plugin.css
Shorter: http://www.domain.com/plugins/foo-bar/plugin.css

Current: http://www.domain.com/wp-content/uploads/2018/09/foo.jpg
Shorter: http://www.domain.com/uploads/2018/09/foo.jpg

If you check out https://aigany.org/, it looks like they are doing something similar.

Thanks for the help.

  • Aside: It looks like aigany.org have introduced an erroneous double slash at the start of the URL-path in some of these URLs. eg. https://aigany.org//assets/themes/... – MrWhite Oct 6 '18 at 23:28

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.