1
这里是我的角度路由器的配置:阿帕奇重定向到的sitemap.xml误差分量
const appRoutes: Routes = [
{ path: 'home', component: HomeComponent,
data: {
animation: {
value: 'home',
}
}
},
{ path: 'about', component: AboutComponent,
data: {
animation: {
value: 'about',
}
}
},
{ path: '', redirectTo: 'home', pathMatch: 'full' },
{ path: '**', component: ErrorComponent }
];
每次我尝试导航到www.myapp.com/sitemap.xml它匹配ErrorComponent并重定向到我的404页。
如何配置Apache服务器停止sitemap.xml去index.html?
下面是我的.htaccess文件我重写规则:
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase/
RewriteRule ^index\.html$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.html [L]
</IfModule>
配置您的服务器不** **到index.html的服务时的路径是sitemap.xml的 –
我如何可以针对在.htaccess文件sitemap.xml的? – adamjesmith
我已将.htaccess代码添加到信息 – adamjesmith