How would I write a .htaccess redirect rule if the URL contains a certain word?
.htaccess
e.g. if it contains foobar then redirect to index.php
foobar
index.php
RewriteCond %{REQUEST_URI} foobar RewriteRule .* index.php
or some variant thereof.
2.1m questions
2.1m answers
60 comments
57.0k users