htaccess的重写URL删除子目录 [英] htaccess rewrite url remove subdirectory
本文介绍了htaccess的重写URL删除子目录的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我试图重写
http://www.example.com/directory/folder/*
到
http://www.example.com/directory/*
htaccess的文件在目录
the htaccess file is in directory
这是我的.htaccess文件:
this is my .htaccess file :
RewriteEngine on
RewriteBase /directory/
RewriteRule ^(.*)$ folder/$1 [L]
任何帮助将是非常美联社preciated。
Any help would be much appreciated.
推荐答案
这是我落得这样做:
Options +FollowSymLinks
RewriteEngine on
RewriteCond %{REQUEST_URI} !(.*)folder
RewriteRule ^(.*)$ folder/$1 [L]
这篇关于htaccess的重写URL删除子目录的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文