开发者

Redirect using .htaccess

开发者 https://www.devze.com 2023-01-29 09:14 出处:网络
My main domain : http://www.mydomain.com I have 3 directories in my domain: http://www.mydomain.com/cms

My main domain : http://www.mydomain.com

I have 3 directories in my domain:

http://www.mydomain.com/cms
http://www.mydomain.com/blog
http://www.mydomain.com/forum

I want that whenever someone types www.mydomain.com he must go to http://www.mydomain.com/cms and later my other folders are anyways linked via menu items in my CMS, however the br开发者_JS百科owser must show as http://www.mydomain.comonly for the main page rest can be regular display.

I read some time back somewhere that it is possible to do so using the .htaccess file

Is it really possible to do this? If yes then how?

Kindly help.


Try this mod_rewrite rule:

RewriteEngine on
RewriteRule ^$ cms
0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号