脚本宝典收集整理的这篇文章主要介绍了php – 角度HTML5模式,路由器将重新加载页面,脚本宝典觉得挺不错的,现在分享给大家,也给大家做个参考。
$locationPRovider.htML5Mode(true);
我的问题是,如果我在重新加载整个页面后接受cont状态.我正在重定向到定义为其他状态的本地状态.
使用的配置是 –
RewrITeEngine On PHP_value post_max_size 120M PHP_value upload_max_filesize 120M PHP_value max_execution_time 90 RewriteCond %{HTTP_HOST} ^54\.201\.153\.244$[NC,OR] RewriteCond %{HTTPS} off rewriterule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [R,L] RewriteCond %{HTTP_HOST} ^adkarlo.COM$[NC] RewriteRule ^(.*)$https://www.adkarlo.com/$1 [R=301,L] #RewriteBase /html/ ErrorDocument 404 /404.PHP RewriteCond %{REQUEST_FILENamE} -f RewriteRule ^ - [L] RewriteRule ^(.*)$index.PHP [L]
您的重写规则在目标网址中不应有#.相反,使用这个
RewriteEngine on # Don't rewrite files RewriteCond %{REQUEST_FILENAME} -f RewriteRule ^ - [L] # Rewrite everything else to index.html to allow html5 state links RewriteRule ^ index.PHP [L]
来源〜https://github.com/angular-ui/ui-router/wiki/Frequently-Asked-Questions#how-to-configure-your-server-to-work-with-html5mode
另外,不需要设置RewriteBase.
以上是脚本宝典为你收集整理的php – 角度HTML5模式,路由器将重新加载页面全部内容,希望文章能够帮你解决php – 角度HTML5模式,路由器将重新加载页面所遇到的问题。
本图文内容来源于网友网络收集整理提供,作为学习参考使用,版权属于原作者。
如您有任何意见或建议可联系处理。小编QQ:384754419,请注明来意。