我怎么能只在我的网站的子目录下,用干净的网址? [英] How can I use a clean URL only in a subfolder of my website?
问题描述
我有一个网站 http://www.mydomain.com 在这里,我创建了一个子文件夹 http://www.mydomain.com/products 。我想改变所有的页面的产品文件夹的清洁URL里。我知道的.htaccess应该是产品的文件夹中。如果它的启用,它会影响到我的网站的所有父目录和文件
我的意思是 http://www.mydomain.com/ 这里,是否会影响页面在这里也
我有关于.htaccess文件多了一个疑问,是有办法,我可以允许通过任何code code的mod_rewrite没有直接编辑httpd.conf文件
请帮我
感谢
我有关于.htaccess文件多了一个疑问,是有办法,我可以允许通过任何code code的mod_rewrite没有直接编辑httpd.conf文件
您把此行之前,你的.htaccess文件中的任何重写规则,这将开启重写引擎 - 不需要改变的httpd.conf
RewriteEngine叙述上
如果它的启用,它会影响到我的网站的所有父目录和文件
.htaccess文件只会影响它在文件夹,该文件夹的子文件夹中的任何
I have a web site http://www.mydomain.com Here I have created a sub folder http://www.mydomain.com/products. I want to change all the page inside the product folder as clean URL. I know .htaccess should be inside product folder. If it's enabled, will it affect all the parent directories and files of my site
I mean http://www.mydomain.com/ here, will it affect the pages here also.
I have one more doubt about .htaccess file, is there a way I can enable mod_rewrite through any code code without directly editing httpd.conf file
Please help me
Thanks
i have one more doubt about .htaccess file, is there a way i can enable mod_rewrite through any code code without directly editing httpd.conf file
You place this line before any rewrite rules in your .htaccess file, which will switch on the rewrite engine - no httpd.conf change required.
RewriteEngine on
If it's enabled, will it affect all the parent directories and files of my site
The .htaccess file will only affect the folder it is in and any subfolder of that folder.
这篇关于我怎么能只在我的网站的子目录下,用干净的网址?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!