I would like to redirect anything that does not begin with /X
, to /X
, and, I'm trying to do this by using .htaccess
with this content:
RewriteEngine On
RewriteCond %{REQUEST_URI} ^(?!/X)
RewriteRule ^(.*)$ /X/$1
What am I missing?
EDIT:
I've also tried:
RewriteEngine On
RewriteCond %{REQUEST_URI} !^/X
RewriteRule ^(.*)$ /X/$1 [L]
and using this tool seems like it should work, but for example www.site.com/style.css
It's now working...
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…