服务器 Gind.cn
  • Linux
  • Windows
  • Ubuntu
  1. 服务器 Gind.cn
  2. .htaccess mod重写
  3. 我想redirecthttp://www.mydomain.com/subfolder/index.php到http://mydomain.com/subforlder/index.php,我该怎么做?
Intereting Posts
有没有办法在特定条件下通过OpenVPN推送路线? 是否有可能使用虚拟化解决scheme来模拟硬件? 客户端不会通过PXE和WDS启动 如何使用命令行界面连接到Windows服务器? (CLI) Linux软件RAID-5:发生故障的驱动器不会降级arrays subneting ..是192.168.0.1/24不同于192.168.0.1/25? ESXi 4无法find启动设备 Ubuntu的服务器通过端口转发拒绝连接 SSH代理转发debian挤 aws实例冻结,如何找出哪里出了问题 chroot用户var / www / html SQL Server:如何缩小FileStream文件? 为什么Apache使用mod_fastcgi为PHP FPM设置Content-Language头? Ubuntu:监视硬件RAID并在失败时通知? 如何“扫描到电子邮件”的文件没有电子邮件离开我们的局域网,并自动转储附件到用户文件夹?

我想redirecthttp://www.mydomain.com/subfolder/index.php到http://mydomain.com/subforlder/index.php,我该怎么做?

我想redirecthttp://www.mydomain.com/subfolder/index.php到没有WWW前缀的 相同的URL ,我怎么能实现这一点?

谢谢

  • 在IE7上的HTTP 302问题
  • 仅适用于Apple用户的htaccess
  • 如何将httpd.conf标记转换为.htaccess规则?
  • 忽略重写特定的目录
  • Apache RewriteRule将图像,css和js文件视为正常
RewriteEngine on RewriteCond %{HTTP_HOST} ^www\.mydomain\.com$ [NC] RewriteRule ^(.*)$ http://mydomain.com$1 [R=301,L] 

如果你喜欢这个:

 RewriteEngine on RewriteCond %{HTTP_HOST} ^www\.(.*)$ [NC] RewriteRule ^(.*)$ http://%1/$1 [R=301,L] 

RewriteCond意味着如果域名以www开头,那么它将被redirect到mydomain.com。

  • Apache 310使用通配符URLredirect
  • Zlib压缩和放气压缩。 如何在htaccess中正确使用?
  • 优化.htaccess文件
  • 使用Apache中的X-Forwarded-For头来限制访问
  • mod_ReWrite删除一部分的URL
  • 为什么这个服务器redirect到另一个页面?
  • 你能在我的.htaccess中看到错误吗?
  • AddHandler语法
  • Mod_rewrite问题 – 这个文件的代码是做什么的?
  • htaccess unhungry正则expression式导致500错误

  • © 2017 服务器 Gind.cn
  • Topics
  •        
  • Powered by Server
  • Privacy Policy