Reputation: 726
I have looked through the q&a's and couldn't work out how to do it based from the answers
if I want to make
all requrests to localhost/[file/path]
to
localhost/something/[file/path]
what is the .htaccess
I have tried
RedirectMatch localhost/$ /something/
RedirectMatch ^/$ /something/
Upvotes: 0
Views: 44
Reputation: 1072
try
RedirectMatch ^(.*)$ /something/$1 [L]
the (
and )
capture the original url so you can use it later with $1
as the first capture group.
note: if you're working with query strings, make sure the flag is [L,QSA]
Upvotes: 2