根据国家和上下文路径重定向页面

时间:2018-07-20 08:14:33

标签: apache request-uri

  If the request_uri is starting with "^/country/location/London/" then any thing after "/country/location/London/(.*)" should redirect to "/$1" and fetch the data from back-end for "/country/location/London/$1"

尝试了如下规则。

RewriteEngine On
RewriteCond %{REQUEST_URI} ^/country/location/london/ [NC]
RewriteRule ^/(.*)\.html$ /$1.html [NC,L,PT] 
RewriteCond %{REQUEST_URI} ^/country/location/germany/ [NC]
RewriteRule ^/(.*)\.html$ /$1.html [NC,L,PT]

0 个答案:

没有答案
相关问题