Rewrite url for missing resource
For each web request (file or directory) that doesn't start with /en-US/
, I want to
serve up the original resource if it exists, otherwise serve up the /en-US/
version.
How开发者_C百科 would I do this using rewrite rules in a .htaccess file?
Try something like this:
RewriteCond $0 !^en-US/
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule .+ en-US/$0 [L]
精彩评论