dudemanbearpig
dudemanbearpig

Reputation: 1312

.htaccess URL rewrite only rerwites one page

I'm rerwiting a URL to point to a different URL under the hood. But it seems like all the other files in different directories referenced by index.php (e.g. css files, JS files, etc) do not get redirected. How can I accomplish this?

I have

RewriteEngine On
RewriteCond %{REQUEST_URI} ^/test($|/)
RewriteRule .*$ ../index.php?orgid=4 [L]

Upvotes: 0

Views: 92

Answers (1)

dudemanbearpig
dudemanbearpig

Reputation: 1312

I found the answer is

RewriteRule ^(test)(.*)/?$ index.php?orgid=4 [L]

In the browser, this will show as example.com/test, while under the hood the url is actually example.com/index.php?orgid=4

Upvotes: 1

Related Questions