开发者

How do i setup a redirect for a subfolder using CodeIgniter

I'm looking to redirect mydomain.com/blog to the CodeIgniter blog controller when I have a folder in existence at mydomain.com/blog. I have read into it and I think the use of the Routes feature might get me going. But I presume I nee开发者_StackOverflowd a new line in my .htaccess file that says its a unique exception and it should load the blog controller.

Thanks for any help/suggestions.


Is it worth it? Just rename the blog folder. I find it unlikely you can have both at the same time, how will the browser know which one to serve?

You may be able to use htaccess...say:

RewriteCond %{REQUEST_URI} "/blog/"

or

RewriteCond %{REQUEST_FILENAME} -d

but then my knowledge of this isn't fantastic.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜