Redirect requests only if the file is not found?

后端 未结 6 1391
借酒劲吻你
借酒劲吻你 2020-11-28 08:23

I\'m hoping there is a way to do this with mod_rewrite and Apache, but maybe there is another way to consider too.

On my site, I have directories set up for re-skinn

6条回答
  •  失恋的感觉
    2020-11-28 08:42

    I think you want something along these lines:

    RewriteEngine on
    RewriteCond %{DOCUMENT_ROOT}clients/$1/$2 -f
    RewriteRule ^clients/([^/]+)/(.*)$ %{DOCUMENT_ROOT}clients/$1/$2 [L]
    RewriteRule ^clients/([^/]+)/(.*)$ %{DOCUMENT_ROOT}$2 [L]
    

提交回复
热议问题