首页 \ 问答 \ htaccess URL重写 - 根到子文件夹(具有相同名称的文件夹)(htaccess URL Rewrite - Root to Subfolder (with folder of the same name))

htaccess URL重写 - 根到子文件夹(具有相同名称的文件夹)(htaccess URL Rewrite - Root to Subfolder (with folder of the same name))

我在www.domain.com/blog/blog.html上有一个文件,我想重写为www.domain.com/blog。

我已经找到了重写删除扩展名.html但是我遇到了循环问题,或者在尝试执行上述操作时最终将博客重写指向博客文件夹。

我是新手重写语法,所以非常感谢帮助!


I have a file at www.domain.com/blog/blog.html that I want to rewrite as www.domain.com/blog.

I have figured out the rewrite for removing the extension .html but am having either circular issues or end up pointing the blog rewrite to the blog folder when trying to do the above.

I am new to rewrite syntax, so help would be much appreciated!


原文:https://stackoverflow.com/questions/30743414
更新时间:2022-03-02 14:03

最满意答案

Web服务器是名为WebDev.WebServer.EXE的可执行文件,位于\ WINDOWS \ Microsoft.NET \ Framework \ v2.0.50727中。 在调试网站时,Visual Studio使用以下参数启动应用程序的实例。

WebDev.WebServer.exe \ port \ path [\ vpath]

此ASP.NET开发服务器仅使用调试文件夹中的已编译Web应用程序(以/ path形式提供)来为网站提供服务。

你可以在这里阅读更多。


The web server is an executable file named WebDev.WebServer.EXE and located in \WINDOWS\Microsoft.NET\Framework\v2.0.50727. When debugging the web site, Visual Studio starts up an instance of the application with the following parameters.

WebDev.WebServer.exe \port \path [\vpath]

This ASP.NET Development Server simply uses the compiled web application in the debug folder, which is provided as /path, to serve the website.

You can read more about this here.

相关问答

更多
  • 你不能在cassini中使用net.tcp,所以你可以做任何改变来让它工作。 你必须在你的机器上使用IIS。 http://tomasz.janczuk.org/2009/11/pubsub-sample-with-wcf-nettcp-protocol.html http://social.msdn.microsoft.com/Forums/en-US/wcf/thread/6828959c-43c1-4452-8070-01f14df1c1d2 要在IIS7中调试它,您可以附加到Visual Studi ...
  • 也许您必须在Visual Studio Tools命令提示符下执行以下操作: aspnet_regiis -i 您可以在这里阅读有关ASP.NET IIS注册工具(Aspnet_regiis.exe)的更多 信息 。 Maybe you have to execute the following in the Visual Studio Tools command prompt: aspnet_regiis -i You can read more about the ASP.NET IIS Regis ...
  • 这就是你要找的东西: http://www.hanselman.com/blog/HowToSetAnIISApplicationOrAppPoolToUseASPNET35RatherThan20.aspx This is what you're looking for: http://www.hanselman.com/blog/HowToSetAnIISApplicationOrAppPoolToUseASPNET35RatherThan20.aspx
  • 您是否在解决方案中设置了使用Development Server的其他项目? 如果任何项目具有该设置,则Visual Studio将启动开发服务器,以防您调试该项目。 Do you have other projects in the solution that are set to use the Development Server? If any of the projects have the setting, Visual Studio will start the Development Ser ...
  • Web服务器是名为WebDev.WebServer.EXE的可执行文件,位于\ WINDOWS \ Microsoft.NET \ Framework \ v2.0.50727中。 在调试网站时,Visual Studio使用以下参数启动应用程序的实例。 WebDev.WebServer.exe \ port \ path [\ vpath] 此ASP.NET开发服务器仅使用调试文件夹中的已编译Web应用程序(以/ path形式提供)来为网站提供服务。 你可以在这里阅读更多。 The web server ...
  • 我自己想出了这个。 这里的问题不是HOSTS文件不起作用,而是我使用错误的方法从浏览器中检测主机头。 这不起作用,只重复ASP开发服务器所在的127.0.0.1 localhost。 Request.Url.Host; 但是,通过使用以下内容,可以存储输入浏览器的域,并可用于动态更改站点行为,即使在ASP开发服务器上也是如此。 HttpContext.Current.Request.Headers.Get("Host").ToString(); 因此,在Dev服务器上测试多个域的解决方案是: 在 ...
  • 首先,确保将WebService设置为Dynamic。 然后我建议你把URI放在你的web.config文件中,如下所示: 然后,当您实例化WebService时,请执行以下操作: WebService service = new WebService(); service.Uri = Configurati ...
  • 通过在IIS 6或7上运行,您不会从ASP获得任何额外的东西。您是否遇到了陷入IIS 5.1的任何特定问题? The short answer is No, there is no small web server that runs classic ASP. There are many alternatives, as mentioned here, such as IIS or Apache plug-ins, but none that has a similar small footprint l ...
  • 如果你想坚持使用c ++,请尝试wt: http : //www.webtoolkit.eu/wt 。 从我有限的经验来看,php和基于它构建的某些 框架是最容易进入的。 Web2py是一个不错的便携式python框架(我被告知代码可以在google appengine中运行而无需修改),您也可以查看。 但它归结为个人的优先权。 试试你能找到的所有鞋子,选择最适合你的鞋子。 If you would like to stick with with c++, try wt: http://www.webtoo ...
  • 谢谢你的帮助。 这实际上是我的错。 我实际上前一天禁用了目录监控,因为它不允许我构建网站。 我刚刚在一些论坛上找到了解决方案。 我当时不知道那是什么东西,我很高兴它有效。 这是链接: http : //support.microsoft.com/kb/911272 我为'HKLM \ Software \ Microsoft \ ASP.NET \ FCNMode'注册表项将值设置为2。 如果我将它设置为0然后项目进入无限构建,可能是因为机器速度慢。 值2对我有用。 Thanks for the help ...

相关文章

更多

最新问答

更多
  • python的访问器方法有哪些
  • 使用Zend Framework 2中的JOIN sql检索数据(Retrieve data using JOIN sql in Zend Framework 2)
  • 透明度错误IE11(Transparency bug IE11)
  • linux的基本操作命令。。。
  • 响应navi重叠h1和nav上的h1链接不起作用(Responsive navi overlaps h1 and navi links on h1 isn't working)
  • 在C中读取文件:“r”和“a +”标志的不同行为(Reading a File in C: different behavior for “r” and “a+” flags)
  • NFC提供什么样的带宽?(What Kind of Bandwidth does NFC Provide?)
  • 元素上的盒子阴影行为(box-shadow behaviour on elements)
  • Laravel检查是否存在记录(Laravel Checking If a Record Exists)
  • 设置base64图像的大小javascript - angularjs(set size of a base64 image javascript - angularjs)
  • 想学Linux 运维 深圳有哪个培训机构好一点
  • 为什么有时不需要在lambda中捕获一个常量变量?(Why is a const variable sometimes not required to be captured in a lambda?)
  • 在Framework 3.5中使用服务器标签<%=%>设置Visible属性(Set Visible property with server tag <%= %> in Framework 3.5)
  • AdoNetAppender中的log4net连接类型无效(log4net connection type invalid in AdoNetAppender)
  • 错误:发送后无法设置标题。(Error: Can't set headers after they are sent. authentication system)
  • 等待EC2实例重启(Wait for an EC2 instance to reboot)
  • 如何在红宝石中使用正则表达式?(How to do this in regex in ruby?)
  • 使用鼠标在OpenGL GLUT中绘制多边形(Draw a polygon in OpenGL GLUT with mouse)
  • 江民杀毒软件的KSysnon.sys模块是什么东西?
  • 处理器在传递到add_xpath()或add_value()时调用了什么顺序?(What order are processors called when passed into add_xpath() or add_value()?)
  • sp_updatestats是否导致SQL Server 2005中无法访问表?(Does sp_updatestats cause tables to be inaccessible in SQL Server 2005?)
  • 如何创建一个可以与持续运行的服务交互的CLI,类似于MySQL的shell?(How to create a CLI that can interact with a continuously running service, similar to MySQL's shell?)
  • AESGCM解密失败的MAC(AESGCM decryption failing with MAC)
  • SQL查询,其中字段不包含$ x(SQL Query Where Field DOES NOT Contain $x)
  • PerSession与PerCall(PerSession vs. PerCall)
  • C#:有两个构造函数的对象:如何限制哪些属性设置在一起?(C#: Object having two constructors: how to limit which properties are set together?)
  • 平衡一个精灵(Balancing a sprite)
  • n2cms Asp.net在“文件”菜单上给出错误(文件管理器)(n2cms Asp.net give error on Files menu (File Manager))
  • Zurb Foundation 4 - 嵌套网格对齐问题(Zurb Foundation 4 - Nested grid alignment issues)
  • 湖北京山哪里有修平板计算机的