如何摆脱我网站网址中的 /webroot/page/home
How to get rid of the /webroot/page/home in the url of my website?
我已经做了一个网站,现在想把它放到网上。它已经在域上,但存在问题。URL仍然很奇怪,我想修复它但不知道如何修复。
如何:example.com/webroot/page/home
- example.com/webroot/page/membersInfo/infoBulletin/
应该如何:example.com
- example.com/membersinfo/infobulletin
我想摆脱/webroot/page/
多谢
阿诺娜
我使用:Twig,Html,Bootstrap,JS,JQ,CSS,PHP,JSON
一个简单的解决方案是将站点文件夹移动到两个目录上,但我不鼓励这样做。如果您可以保持站点文件井井有条(即使用子目录),您的生活将更轻松。
我认为这样的事情在你的.htaccess
中会起作用。如果没有,请告诉我,我会玩它:
#if rewrite engine isn't already on
RewriteEngine On
#in case you only want to rewrite the path for say, mysite.com, then use this RewriteCond as well
RewriteCond %{SERVER_NAME} mysite.com
#rewrite the request at the root to have /webroot/page in front of it
RewriteRule (.+) /webroot/page$1 [L]
相关文章:
- cpu:phantom:page的比例可以大于1:1:1吗
- 如何在不使用Page.Theme属性的情况下设置页面样式和主题
- 在page.open()-PhantomJS中无法访问全局变量
- 向page.includeJs()和page.eevaluate()内的匿名函数传递参数
- 如何在特定时间重新加载page.php,例如:07:45.非持续时间,例如:每5秒
- ascx page 中的 javascript 抛出 HTTPexception
- 在page.evaluateJavaScript函数中使用PhantomJS变量
- 如何在页面 Page.IsPostBack 之后禁用 JavaScript 函数
- Javascript Password Page
- jQuery keyUp on Page Load
- 复选框(JSP PAGE)并插入到mysql数据库
- 解析 /page.xhtml 时出错:跟踪错误[行: 42] 与元素类型“id”关联的属性“{1}”应使用左引号
- 在数据库(JSP PAGE)中获取多个复选框结果
- AJAX/page refresh kills JS/jQuery
- Rails应用程序中的每个javascript文件都需要.on('page:change',初始化)吗?
- Phantomjs page.evaluate and q deferred issue
- jquery ajax post to .aspx page load - how to read variable p
- ASP Page + JavaScript:如何隐藏元素并获取其真实位置
- HTML JavaScript Stay on Div on page reload
- 如何摆脱我网站网址中的 /webroot/page/home