Relative Content

Tag Archive for .htaccess

htaccess redirect url with query strings on apache

my previous website was Java based. Currently it’s Wordpress.
I would love to redirect some old url’s that are still relevant to me.
However I can’t get it to work though I have tried it for hours now.

htaccess rewrite for cache busting

In an attempt to cache bust .css and .js files, and not wanting to go the query string route, I want to, via htaccess rewrite paths that start with “foo*/” to remove/ignore “foo*/” – the asterisk can be any number, as it will be the version.

htaccess rewrite for cache busting

In an attempt to cache bust .css and .js files, and not wanting to go the query string route, I want to, via htaccess rewrite paths that start with “foo*/” to remove/ignore “foo*/” – the asterisk can be any number, as it will be the version.

htaccess – RewriteCond matches first part of the URL

I’m trying to make sure a redirect rule doesn’t match if the file doesn’t exist. For example, example.com/blog should match if blog.php exists otherwise not. The problem is with a url like example.com/blog/a/test it matches example.com/blog.php and finds the file. It should’ve attempted to find blog/a/test.php.