I have a folder named /test in my application.
Right now i am trying to write an .htaccess file that would show all requests to /test* as /test.
For example:
http://www.example.com/test/ is the actual directory with index.php file in it.
All the requests like the following should go to the same /test directory
www.example.com/test-hello/
www.example.com/test-world/
www.example.com/test-htacess/
www.example.com/test123/
Basically any requests to /test* should go to /test.
This is what I’ve tried so far:
RewriteRule ^/test* /test
You need to use
RewriteCondto first match “test in url”Try below: