apache重定向多次追加文件名

时间:2016-03-02 13:59:53

标签: apache .htaccess mod-rewrite iis

如果我在没有指定文件名的情况下从域1重定向到域2,它可以正常工作。但是,当我在域1上放置文件名并重定向时,它会将文件名3x附加到domain2上。

RewriteEngine On
RewriteBase /

# If there are caps, set HASCAPS to true and skip next rule
RewriteRule [A-Z] - [E=HASCAPS:TRUE,S=1]

# Skip this entire section if no uppercase letters in requested URL
RewriteRule ![A-Z] - [S=28]

# Replace single occurance of CAP with cap, then process next Rule.
RewriteRule ^([^A]*)A(.*)$ $1a$2
RewriteRule ^([^B]*)B(.*)$ $1b$2
RewriteRule ^([^C]*)C(.*)$ $1c$2
RewriteRule ^([^D]*)D(.*)$ $1d$2
RewriteRule ^([^E]*)E(.*)$ $1e$2
RewriteRule ^([^F]*)F(.*)$ $1f$2
RewriteRule ^([^G]*)G(.*)$ $1g$2
RewriteRule ^([^H]*)H(.*)$ $1h$2
RewriteRule ^([^I]*)I(.*)$ $1i$2
RewriteRule ^([^J]*)J(.*)$ $1j$2
RewriteRule ^([^K]*)K(.*)$ $1k$2
RewriteRule ^([^L]*)L(.*)$ $1l$2
RewriteRule ^([^M]*)M(.*)$ $1m$2
RewriteRule ^([^N]*)N(.*)$ $1n$2
RewriteRule ^([^O]*)O(.*)$ $1o$2
RewriteRule ^([^P]*)P(.*)$ $1p$2
RewriteRule ^([^Q]*)Q(.*)$ $1q$2
RewriteRule ^([^R]*)R(.*)$ $1r$2
RewriteRule ^([^S]*)S(.*)$ $1s$2
RewriteRule ^([^T]*)T(.*)$ $1t$2
RewriteRule ^([^U]*)U(.*)$ $1u$2
RewriteRule ^([^V]*)V(.*)$ $1v$2
RewriteRule ^([^W]*)W(.*)$ $1w$2
RewriteRule ^([^X]*)X(.*)$ $1x$2
RewriteRule ^([^Y]*)Y(.*)$ $1y$2
RewriteRule ^([^Z]*)Z(.*)$ $1z$2

# If there are any uppercase letters, restart at very first RewriteRule in file.
RewriteRule [A-Z] - [N]

RewriteCond %{ENV:HASCAPS} TRUE
RewriteRule ^/?(.*) /$1 [R=301,L]

Redirect "/4gcustomers/" "http://195.233.194.118/4gcustomers/"
Redirect "/4gmap/" "http://195.233.194.118/4gmap/"
Redirect "/alexh/" "http://195.233.194.118/alexh/"
Redirect "/boc/" "http://195.233.194.118/boc/"
Redirect "/bsm/" "http://195.233.194.118/bsm/"
Redirect "/bsmmap/" "http://195.233.194.118/bsmmap/"
Redirect "/beaconmap/" "http://195.233.194.118/beaconmap/"
Redirect "/cmproblemdetail/" "http://195.233.194.118/cmproblemdetail/"
Redirect "/cmproblemmanagement/" "http://195.233.194.118/cmproblemmanagement/"
Redirect "/cellavailability/" "http://195.233.194.118/cellavailability/"
Redirect "/changemanagement/" "http://195.233.194.118/changemanagement/"
Redirect "/code/" "http://195.233.194.118/code/"
Redirect "/corp-crq-impact/" "http://195.233.194.118/corp-crq-impact/"
Redirect "/customerexperience/" "http://195.233.194.118/customerexperience/"
Redirect "/djdanny/" "http://195.233.194.118/djdanny/"
Redirect "/dq/" "http://195.233.194.118/dq/"
Redirect "/dropcall/" "http://195.233.194.118/dropcall/"
Redirect "/events/" "http://195.233.194.118/events/"
Redirect "/flukoim/" "http://195.233.194.118/flukoim/"
Redirect "/fixedproblemmanagement/" "http://195.233.194.118/fixedproblemmanagement/"
Redirect "/graham/" "http://195.233.194.118/graham/"
#Redirect "/incidentmanagement/" "http://195.233.194.118/incidentmanagement/"
Redirect "/incidentmanagementscreen/" "http://195.233.194.118/incidentmanagementscreen/"
Redirect "/intproblemdetail/" "http://195.233.194.118/intproblemdetail/"
Redirect "/intproblemmanagement/" "http://195.233.194.118/intproblemmanagement/"
Redirect "/javascriptspellcheck/" "http://195.233.194.118/javascriptspellcheck/"
Redirect "/kpc/" "http://195.233.194.118/kpc/"
Redirect "/kpis/" "http://195.233.194.118/kpis/"
Redirect "/lifecycle/" "http://195.233.194.118/lifecycle/"
Redirect "/msss/" "http://195.233.194.118/msss/"
Redirect "/mvno/" "http://195.233.194.118/mvno/"
Redirect "/mvnoreporting/" "http://195.233.194.118/mvnoreporting/"
Redirect "/managedkpi/" "http://195.233.194.118/managedkpi/"
Redirect "/maskell/" "http://195.233.194.118/maskell/"
Redirect "/matth/" "http://195.233.194.118/matth/"
Redirect "/matts/" "http://195.233.194.118/matts/"
Redirect "/metropolis_old/" "http://195.233.194.118/metropolis_old/"
Redirect "/nll/" "http://195.233.194.118/nll/"
Redirect "/noc_inc_board/" "http://195.233.194.118/noc_inc_board/"
Redirect "/noc_screens/" "http://195.233.194.118/noc_screens/"
Redirect "/nsc/" "http://195.233.194.118/nsc/"
Redirect "/networkperformance/" "http://195.233.194.118/networkperformance/"
Redirect "/networkrag/" "http://195.233.194.118/networkrag/"
Redirect "/networksupport/" "http://195.233.194.118/networksupport/"
Redirect "/network_kpis/" "http://195.233.194.118/network_kpis/"
Redirect "/new folder/" "http://195.233.194.118/new folder/"
Redirect "/newco/" "http://195.233.194.118/newco/"
Redirect "/oidocs/" "http://195.233.194.118/oidocs/"
Redirect "/oireportsuite/" "http://195.233.194.118/oireportsuite/"
Redirect "/olympics/" "http://195.233.194.118/olympics/"
Redirect "/olympics2012_old/" "http://195.233.194.118/olympics2012_old/"
Redirect "/olympicscellavailability_dev/" "http://195.233.194.118/olympicscellavailability_dev/"
Redirect "/olympicsexample_donotuse/" "http://195.233.194.118/olympicsexample_donotuse/"
Redirect "/onenetpm/" "http://195.233.194.118/onenetpm/"
Redirect "/paduanos/" "http://195.233.194.118/paduanos/"
Redirect "/problemmanagement/" "http://195.233.194.118/problemmanagement/"
#Redirect "/ranops/" "http://195.233.194.118/ranops/"
Redirect "/ranops old/" "http://195.233.194.118/ranops old/"
Redirect "/rbs/" "http://195.233.194.118/rbs/"
Redirect "/reeder/" "http://195.233.194.118/reeder/"
Redirect "/remedy/" "http://195.233.194.118/remedy/"
Redirect "/remedytest/" "http://195.233.194.118/remedytest/"
Redirect "/requestform/" "http://195.233.194.118/requestform/"
Redirect "/rivers/" "http://195.233.194.118/rivers/"
Redirect "/socomms/" "http://195.233.194.118/socomms/"
Redirect "/securityscreens/" "http://195.233.194.118/securityscreens/"
Redirect "/servicesupport/" "http://195.233.194.118/servicesupport/"
Redirect "/showmode/" "http://195.233.194.118/showmode/"
Redirect "/simples/" "http://195.233.194.118/simples/"
Redirect "/simples2/" "http://195.233.194.118/simples2/"
#Redirect "/site/" "http://195.233.194.118/site/"
Redirect "/site2/" "http://195.233.194.118/site2/"
Redirect "/siteactivity/" "http://195.233.194.118/siteactivity/"
Redirect "/sitesql/" "http://195.233.194.118/sitesql/"
Redirect "/site_old/" "http://195.233.194.118/site_old/"
Redirect "/sitetemp/" "http://195.233.194.118/sitetemp/"
Redirect "/specialevents/" "http://195.233.194.118/specialevents/"
Redirect "/statuschecker/" "http://195.233.194.118/statuschecker/"
Redirect "/tlt/" "http://195.233.194.118/tlt/"
Redirect "/techgrads/" "http://195.233.194.118/techgrads/"
Redirect "/templates/" "http://195.233.194.118/templates/"
Redirect "/testnetworkperformance/" "http://195.233.194.118/testnetworkperformance/"
Redirect "/textsanta/" "http://195.233.194.118/textsanta/"
Redirect "/thanos/" "http://195.233.194.118/thanos/"
Redirect "/tom/" "http://195.233.194.118/tom/"
Redirect "/topcorporate/" "http://195.233.194.118/topcorporate/"
Redirect "/topinfluencers/" "http://195.233.194.118/topinfluencers/"
Redirect "/touchpointmonitoring/" "http://195.233.194.118/touchpointmonitoring/"
Redirect "/touchpointtest/" "http://195.233.194.118/touchpointtest/"
Redirect "/travis/" "http://195.233.194.118/travis/"
Redirect "/ukchangemanagement/" "http://195.233.194.118/ukchangemanagement/"
Redirect "/ukchangemanagement2/" "http://195.233.194.118/ukchangemanagement2/"
Redirect "/ukincidentmanagement/" "http://195.233.194.118/ukincidentmanagement/"
Redirect "/ukoim/" "http://195.233.194.118/ukoim/"
Redirect "/ukoimtemp/" "http://195.233.194.118/ukoimtemp/"
Redirect "/ukproblemmanagement/" "http://195.233.194.118/ukproblemmanagement/"
Redirect "/vendor_kpis/" "http://195.233.194.118/vendor_kpis/"
Redirect "/websql/" "http://195.233.194.118/websql/"
Redirect "/webservice/" "http://195.233.194.118/webservice/"
Redirect "/zenpm/" "http://195.233.194.118/zenpm/"
Redirect "/amcharts/" "http://195.233.194.118/amcharts/"
Redirect "/arif/" "http://195.233.194.118/arif/"
Redirect "/aspnet_client/" "http://195.233.194.118/aspnet_client/"
Redirect "/btpecsi/" "http://195.233.194.118/btpecsi/"
Redirect "/cakes/" "http://195.233.194.118/cakes/"
Redirect "/checknsc/" "http://195.233.194.118/checknsc/"
Redirect "/danksk/" "http://195.233.194.118/danksk/"
Redirect "/futcherm/" "http://195.233.194.118/futcherm/"
Redirect "/hsabiti/" "http://195.233.194.118/hsabiti/"
Redirect "/iphone5/" "http://195.233.194.118/iphone5/"
Redirect "/iphone5s/" "http://195.233.194.118/iphone5s/"
Redirect "/iphone6/" "http://195.233.194.118/iphone6/"
Redirect "/jorgebrito/" "http://195.233.194.118/jorgebrito/"
Redirect "/kpi_pack/" "http://195.233.194.118/kpi_pack/"
Redirect "/kulakova/" "http://195.233.194.118/kulakova/"
Redirect "/lbs-feed/" "http://195.233.194.118/lbs-feed/"
Redirect "/networkragdemo/" "http://195.233.194.118/networkragdemo/"
Redirect "/networkstatuschecker/" "http://195.233.194.118/networkstatuschecker/"
Redirect "/nmp/" "http://195.233.194.118/nmp/"
Redirect "/noc/" "http://195.233.194.118/noc/"
Redirect "/p3-2015/" "http://195.233.194.118/p3-2015/"
Redirect "/priority/" "http://195.233.194.118/priority/"
Redirect "/reloader/" "http://195.233.194.118/reloader/"
Redirect "/roger/" "http://195.233.194.118/roger/"
Redirect "/sergio/" "http://195.233.194.118/sergio/"
Redirect "/sitemap/" "http://195.233.194.118/sitemap/"
Redirect "/sitemaptemp/" "http://195.233.194.118/sitemaptemp/"
Redirect "/speed/" "http://195.233.194.118/speed/"
Redirect "/textsantamon/" "http://195.233.194.118/textsantamon/"
Redirect "/textsantastats/" "http://195.233.194.118/textsantastats/"
Redirect "/tpe/" "http://195.233.194.118/tpe/"
Redirect "/wallboard/" "http://195.233.194.118/wallboard/"
Redirect "/woodlowd/" "http://195.233.194.118/woodlowd/"

文件夹

operationalintelligence/4GCustomers/重定向到http://195.233.194.118/4gcustomers/这是正确的。

文件名

operationalintelligence/4GCustomers/index.asp重定向到http://195.233.194.118/4gcustomers/index.asp/index.asp/index.asp这是错误的

更新

我尝试将Redirect更改为RewriteRule,但没有区别。

RewriteEngine On
RewriteBase /

# If there are caps, set HASCAPS to true and skip next rule
RewriteRule [A-Z] - [E=HASCAPS:TRUE,S=1]

# Skip this entire section if no uppercase letters in requested URL
RewriteRule ![A-Z] - [S=28]

# Replace single occurance of CAP with cap, then process next Rule.
RewriteRule ^([^A]*)A(.*)$ $1a$2
RewriteRule ^([^B]*)B(.*)$ $1b$2
RewriteRule ^([^C]*)C(.*)$ $1c$2
RewriteRule ^([^D]*)D(.*)$ $1d$2
RewriteRule ^([^E]*)E(.*)$ $1e$2
RewriteRule ^([^F]*)F(.*)$ $1f$2
RewriteRule ^([^G]*)G(.*)$ $1g$2
RewriteRule ^([^H]*)H(.*)$ $1h$2
RewriteRule ^([^I]*)I(.*)$ $1i$2
RewriteRule ^([^J]*)J(.*)$ $1j$2
RewriteRule ^([^K]*)K(.*)$ $1k$2
RewriteRule ^([^L]*)L(.*)$ $1l$2
RewriteRule ^([^M]*)M(.*)$ $1m$2
RewriteRule ^([^N]*)N(.*)$ $1n$2
RewriteRule ^([^O]*)O(.*)$ $1o$2
RewriteRule ^([^P]*)P(.*)$ $1p$2
RewriteRule ^([^Q]*)Q(.*)$ $1q$2
RewriteRule ^([^R]*)R(.*)$ $1r$2
RewriteRule ^([^S]*)S(.*)$ $1s$2
RewriteRule ^([^T]*)T(.*)$ $1t$2
RewriteRule ^([^U]*)U(.*)$ $1u$2
RewriteRule ^([^V]*)V(.*)$ $1v$2
RewriteRule ^([^W]*)W(.*)$ $1w$2
RewriteRule ^([^X]*)X(.*)$ $1x$2
RewriteRule ^([^Y]*)Y(.*)$ $1y$2
RewriteRule ^([^Z]*)Z(.*)$ $1z$2

# If there are any uppercase letters, restart at very first RewriteRule in file.
RewriteRule [A-Z] - [N]

RewriteCond %{ENV:HASCAPS} TRUE
RewriteRule ^/?(.*) /$1 [R=301,L]

RewriteRule ^4gcustomers(.*) "http://195.233.194.118/4gcustomers/$1"
RewriteRule ^4gmap(.*) "http://195.233.194.118/4gmap/$1"
RewriteRule ^alexh(.*) "http://195.233.194.118/alexh/$1"
RewriteRule ^boc(.*) "http://195.233.194.118/boc/$1"
RewriteRule ^bsm(.*) "http://195.233.194.118/bsm/$1"
RewriteRule ^bsmmap(.*) "http://195.233.194.118/bsmmap/$1"
RewriteRule ^beaconmap(.*) "http://195.233.194.118/beaconmap/$1"
RewriteRule ^cmproblemdetail(.*) "http://195.233.194.118/cmproblemdetail/$1"
RewriteRule ^cmproblemmanagement(.*) "http://195.233.194.118/cmproblemmanagement/$1"
RewriteRule ^cellavailability(.*) "http://195.233.194.118/cellavailability/$1"
RewriteRule ^changemanagement(.*) "http://195.233.194.118/changemanagement/$1"
RewriteRule ^code(.*) "http://195.233.194.118/code/$1"
RewriteRule ^corp-crq-impact(.*) "http://195.233.194.118/corp-crq-impact/$1"
RewriteRule ^customerexperience(.*) "http://195.233.194.118/customerexperience/$1"
RewriteRule ^djdanny(.*) "http://195.233.194.118/djdanny/$1"
RewriteRule ^dq(.*) "http://195.233.194.118/dq/$1"
RewriteRule ^dropcall(.*) "http://195.233.194.118/dropcall/$1"
RewriteRule ^events(.*) "http://195.233.194.118/events/$1"
RewriteRule ^flukoim(.*) "http://195.233.194.118/flukoim/$1"
RewriteRule ^fixedproblemmanagement(.*) "http://195.233.194.118/fixedproblemmanagement/$1"
RewriteRule ^graham(.*) "http://195.233.194.118/graham/$1"
#RewriteRule ^incidentmanagement(.*) "http://195.233.194.118/incidentmanagement/$1"
RewriteRule ^incidentmanagementscreen(.*) "http://195.233.194.118/incidentmanagementscreen/$1"
RewriteRule ^intproblemdetail(.*) "http://195.233.194.118/intproblemdetail/$1"
RewriteRule ^intproblemmanagement(.*) "http://195.233.194.118/intproblemmanagement/$1"
RewriteRule ^javascriptspellcheck(.*) "http://195.233.194.118/javascriptspellcheck/$1"
RewriteRule ^kpc(.*) "http://195.233.194.118/kpc/$1"
RewriteRule ^kpis(.*) "http://195.233.194.118/kpis/$1"
RewriteRule ^lifecycle(.*) "http://195.233.194.118/lifecycle/$1"
RewriteRule ^msss(.*) "http://195.233.194.118/msss/$1"
RewriteRule ^mvno(.*) "http://195.233.194.118/mvno/$1"
RewriteRule ^mvnoreporting(.*) "http://195.233.194.118/mvnoreporting/$1"
RewriteRule ^managedkpi(.*) "http://195.233.194.118/managedkpi/$1"
RewriteRule ^maskell(.*) "http://195.233.194.118/maskell/$1"
RewriteRule ^matth(.*) "http://195.233.194.118/matth/$1"
RewriteRule ^matts(.*) "http://195.233.194.118/matts/$1"
RewriteRule ^metropolis_old(.*) "http://195.233.194.118/metropolis_old/$1"
RewriteRule ^nll(.*) "http://195.233.194.118/nll/$1"
RewriteRule ^noc_inc_board(.*) "http://195.233.194.118/noc_inc_board/$1"
RewriteRule ^noc_screens(.*) "http://195.233.194.118/noc_screens/$1"
RewriteRule ^nsc(.*) "http://195.233.194.118/nsc/$1"
RewriteRule ^networkperformance(.*) "http://195.233.194.118/networkperformance/$1"
RewriteRule ^networkrag(.*) "http://195.233.194.118/networkrag/$1"
RewriteRule ^networksupport(.*) "http://195.233.194.118/networksupport/$1"
RewriteRule ^network_kpis(.*) "http://195.233.194.118/network_kpis/$1"
RewriteRule ^new folder(.*) "http://195.233.194.118/new folder/$1"
RewriteRule ^newco(.*) "http://195.233.194.118/newco/$1"
RewriteRule ^oidocs(.*) "http://195.233.194.118/oidocs/$1"
RewriteRule ^oireportsuite(.*) "http://195.233.194.118/oireportsuite/$1"
RewriteRule ^olympics(.*) "http://195.233.194.118/olympics/$1"
RewriteRule ^olympics2012_old(.*) "http://195.233.194.118/olympics2012_old/$1"
RewriteRule ^olympicscellavailability_dev(.*) "http://195.233.194.118/olympicscellavailability_dev/$1"
RewriteRule ^olympicsexample_donotuse(.*) "http://195.233.194.118/olympicsexample_donotuse/$1"
RewriteRule ^onenetpm(.*) "http://195.233.194.118/onenetpm/$1"
RewriteRule ^paduanos(.*) "http://195.233.194.118/paduanos/$1"
RewriteRule ^problemmanagement(.*) "http://195.233.194.118/problemmanagement/$1"
#RewriteRule ^ranops(.*) "http://195.233.194.118/ranops/$1"
RewriteRule ^ranops old(.*) "http://195.233.194.118/ranops old/$1"
RewriteRule ^rbs(.*) "http://195.233.194.118/rbs/$1"
RewriteRule ^reeder(.*) "http://195.233.194.118/reeder/$1"
RewriteRule ^remedy(.*) "http://195.233.194.118/remedy/$1"
RewriteRule ^remedytest(.*) "http://195.233.194.118/remedytest/$1"
RewriteRule ^requestform(.*) "http://195.233.194.118/requestform/$1"
RewriteRule ^rivers(.*) "http://195.233.194.118/rivers/$1"
RewriteRule ^socomms(.*) "http://195.233.194.118/socomms/$1"
RewriteRule ^securityscreens(.*) "http://195.233.194.118/securityscreens/$1"
RewriteRule ^servicesupport(.*) "http://195.233.194.118/servicesupport/$1"
RewriteRule ^showmode(.*) "http://195.233.194.118/showmode/$1"
RewriteRule ^simples(.*) "http://195.233.194.118/simples/$1"
RewriteRule ^simples2(.*) "http://195.233.194.118/simples2/$1"
#RewriteRule ^site(.*) "http://195.233.194.118/site/$1"
RewriteRule ^site2(.*) "http://195.233.194.118/site2/$1"
RewriteRule ^siteactivity(.*) "http://195.233.194.118/siteactivity/$1"
RewriteRule ^sitesql(.*) "http://195.233.194.118/sitesql/$1"
RewriteRule ^site_old(.*) "http://195.233.194.118/site_old/$1"
RewriteRule ^sitetemp(.*) "http://195.233.194.118/sitetemp/$1"
RewriteRule ^specialevents(.*) "http://195.233.194.118/specialevents/$1"
RewriteRule ^statuschecker(.*) "http://195.233.194.118/statuschecker/$1"
RewriteRule ^tlt(.*) "http://195.233.194.118/tlt/$1"
RewriteRule ^techgrads(.*) "http://195.233.194.118/techgrads/$1"
RewriteRule ^templates(.*) "http://195.233.194.118/templates/$1"
RewriteRule ^testnetworkperformance(.*) "http://195.233.194.118/testnetworkperformance/$1"
RewriteRule ^textsanta(.*) "http://195.233.194.118/textsanta/$1"
RewriteRule ^thanos(.*) "http://195.233.194.118/thanos/$1"
RewriteRule ^tom(.*) "http://195.233.194.118/tom/$1"
RewriteRule ^topcorporate(.*) "http://195.233.194.118/topcorporate/$1"
RewriteRule ^topinfluencers(.*) "http://195.233.194.118/topinfluencers/$1"
RewriteRule ^touchpointmonitoring(.*) "http://195.233.194.118/touchpointmonitoring/$1"
RewriteRule ^touchpointtest(.*) "http://195.233.194.118/touchpointtest/$1"
RewriteRule ^travis(.*) "http://195.233.194.118/travis/$1"
RewriteRule ^ukchangemanagement(.*) "http://195.233.194.118/ukchangemanagement/$1"
RewriteRule ^ukchangemanagement2(.*) "http://195.233.194.118/ukchangemanagement2/$1"
RewriteRule ^ukincidentmanagement(.*) "http://195.233.194.118/ukincidentmanagement/$1"
RewriteRule ^ukoim(.*) "http://195.233.194.118/ukoim/$1"
RewriteRule ^ukoimtemp(.*) "http://195.233.194.118/ukoimtemp/$1"
RewriteRule ^ukproblemmanagement(.*) "http://195.233.194.118/ukproblemmanagement/$1"
RewriteRule ^vendor_kpis(.*) "http://195.233.194.118/vendor_kpis/$1"
RewriteRule ^websql(.*) "http://195.233.194.118/websql/$1"
RewriteRule ^webservice(.*) "http://195.233.194.118/webservice/$1"
RewriteRule ^zenpm(.*) "http://195.233.194.118/zenpm/$1"
RewriteRule ^amcharts(.*) "http://195.233.194.118/amcharts/$1"
RewriteRule ^arif(.*) "http://195.233.194.118/arif/$1"
RewriteRule ^aspnet_client(.*) "http://195.233.194.118/aspnet_client/$1"
RewriteRule ^btpecsi(.*) "http://195.233.194.118/btpecsi/$1"
RewriteRule ^cakes(.*) "http://195.233.194.118/cakes/$1"
RewriteRule ^checknsc(.*) "http://195.233.194.118/checknsc/$1"
RewriteRule ^danksk(.*) "http://195.233.194.118/danksk/$1"
RewriteRule ^futcherm(.*) "http://195.233.194.118/futcherm/$1"
RewriteRule ^hsabiti(.*) "http://195.233.194.118/hsabiti/$1"
RewriteRule ^iphone5(.*) "http://195.233.194.118/iphone5/$1"
RewriteRule ^iphone5s(.*) "http://195.233.194.118/iphone5s/$1"
RewriteRule ^iphone6(.*) "http://195.233.194.118/iphone6/$1"
RewriteRule ^jorgebrito(.*) "http://195.233.194.118/jorgebrito/$1"
RewriteRule ^kpi_pack(.*) "http://195.233.194.118/kpi_pack/$1"
RewriteRule ^kulakova(.*) "http://195.233.194.118/kulakova/$1"
RewriteRule ^lbs-feed(.*) "http://195.233.194.118/lbs-feed/$1"
RewriteRule ^networkragdemo(.*) "http://195.233.194.118/networkragdemo/$1"
RewriteRule ^networkstatuschecker(.*) "http://195.233.194.118/networkstatuschecker/$1"
RewriteRule ^nmp(.*) "http://195.233.194.118/nmp/$1"
RewriteRule ^noc(.*) "http://195.233.194.118/noc/$1"
RewriteRule ^p3-2015(.*) "http://195.233.194.118/p3-2015/$1"
RewriteRule ^priority(.*) "http://195.233.194.118/priority/$1"
RewriteRule ^reloader(.*) "http://195.233.194.118/reloader/$1"
RewriteRule ^roger(.*) "http://195.233.194.118/roger/$1"
RewriteRule ^sergio(.*) "http://195.233.194.118/sergio/$1"
RewriteRule ^sitemap(.*) "http://195.233.194.118/sitemap/$1"
RewriteRule ^sitemaptemp(.*) "http://195.233.194.118/sitemaptemp/$1"
RewriteRule ^speed(.*) "http://195.233.194.118/speed/$1"
RewriteRule ^textsantamon(.*) "http://195.233.194.118/textsantamon/$1"
RewriteRule ^textsantastats(.*) "http://195.233.194.118/textsantastats/$1"
RewriteRule ^tpe(.*) "http://195.233.194.118/tpe/$1"
RewriteRule ^wallboard(.*) "http://195.233.194.118/wallboard/$1"
RewriteRule ^woodlowd(.*) "http://195.233.194.118/woodlowd/$1"

它被重定向到IIS,那么它可能是那里的设置吗?

1 个答案:

答案 0 :(得分:1)

使用时为我工作:

RewriteEngine On
RewriteBase /

# If there are caps, set HASCAPS to true and skip next rule
RewriteRule [A-Z] - [E=HASCAPS:TRUE,S=1]

# Skip this entire section if no uppercase letters in requested URL
RewriteRule ![A-Z] - [S=28]

RewriteRule ^([^A]*)A(.*)$ /$1a$2 [L]
RewriteRule ^([^B]*)B(.*)$ /$1b$2 [L]
RewriteRule ^([^C]*)C(.*)$ /$1c$2 [L]
RewriteRule ^([^D]*)D(.*)$ /$1d$2 [L]
RewriteRule ^([^E]*)E(.*)$ /$1e$2 [L]
RewriteRule ^([^F]*)F(.*)$ /$1f$2 [L]
RewriteRule ^([^G]*)G(.*)$ /$1g$2 [L]
RewriteRule ^([^H]*)H(.*)$ /$1h$2 [L]
RewriteRule ^([^I]*)I(.*)$ /$1i$2 [L]
RewriteRule ^([^J]*)J(.*)$ /$1j$2 [L]
RewriteRule ^([^K]*)K(.*)$ /$1k$2 [L]
RewriteRule ^([^L]*)L(.*)$ /$1l$2 [L]
RewriteRule ^([^M]*)M(.*)$ /$1m$2 [L]
RewriteRule ^([^N]*)N(.*)$ /$1n$2 [L]
RewriteRule ^([^O]*)O(.*)$ /$1o$2 [L]
RewriteRule ^([^P]*)P(.*)$ /$1p$2 [L]
RewriteRule ^([^Q]*)Q(.*)$ /$1q$2 [L]
RewriteRule ^([^R]*)R(.*)$ /$1r$2 [L]
RewriteRule ^([^S]*)S(.*)$ /$1s$2 [L]
RewriteRule ^([^T]*)T(.*)$ /$1t$2 [L]
RewriteRule ^([^U]*)U(.*)$ /$1u$2 [L]
RewriteRule ^([^V]*)V(.*)$ /$1v$2 [L]
RewriteRule ^([^W]*)W(.*)$ /$1w$2 [L]
RewriteRule ^([^X]*)X(.*)$ /$1x$2 [L]
RewriteRule ^([^Y]*)Y(.*)$ /$1y$2 [L]
RewriteRule ^([^Z]*)Z(.*)$ /$1z$2 [L]

# If there are any uppercase letters, restart at very first RewriteRule in file.
RewriteRule [A-Z] - [N]

RewriteCond %{ENV:HASCAPS} TRUE
RewriteRule ^/?(.*) /$1 [R=301,L]

Redirect "/4gcustomers/" "http://195.233.194.118/4gcustomers/"