的.htaccess - 重定向一个PHP文件到一个虚拟目录 [英] .htaccess - redirect a php File to an Virtual Directory

查看:254
本文介绍了的.htaccess - 重定向一个PHP文件到一个虚拟目录的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

什么的.htaccess线从PHP文件做一个虚拟目录?

What are the .htaccess lines to make a Virtual Directory from a PHP File?

www.domain.de/file.php 应到 www.domain.de/file /

推荐答案

这就是它:

DirectoryIndex index.php
RewriteEngine on
RewriteRule ^file/ file.php [L]
Options -Indexes

这篇关于的.htaccess - 重定向一个PHP文件到一个虚拟目录的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆