Hello i want make an condition in htaccess
if link is contain category
rewrite [test.txt] to [/category/test.txt]
i trying
RewriteCond %{REQUEST_URI} ^(category)/$
RewriteRule ^/category/test.txt$ /test.txt [L]
i want tell him if it contain not if it equal !
the rewrite rule working fine without condition
but after adding condition , it does not work !
and link is contain ‘category’ word !
Then just try
Don’t use that ^ if you don’t want it – it means it will only match at the beginning of a string. The $ at the end means it will only match at the end of a request uri.