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.
精彩评论