simple url rewriting problem
I have an existing website where i have urls like:
/application/index/fuseaction/home.uebersicht/a/44/b/45/web/xyz.htm
I now want to redirect to:
/xyz.html
what it tried is
开发者_运维问答RewriteCond %{HTTP:Host} ^(?:www\.)?mysite.coml$
RewriteCond %{REQUEST_URI} application/index\.cfm.*
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteMap docmap_301 txt: mapping301.txt
RewriteRule ^/application/index.\cfm/(.*)\.htm ${docmap_301:$1} [NC,L,NS]
If this is an inbound rule then this should work for you:
Rewrite Engine on
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule (.+)/((.+).htm) $2l [NC,R=302]
I'm assuming that the missing l
from the long url in your example was intentional.
精彩评论