php - htaccess Redirect to another subfolder if URL contains blog in it -


i have sub folder named "blog" inside public_html.

if url contains blog in either "blog.mydomain.com" or mydomain.com/blog, want redirect mydomain.com/blog/index.php.

the problem using silversrtipe 3.x , have page created name "blog" whenever try mydomain.com/blog instead of redirecting mydomain.com/blog/index.php opens silverstripe page.

how can redirect mydomain.com/blog "mydomain.com/blog/index.php"?

any appreciated.

thanks

you can place rule first rule:

rewritecond %{http_host} ^blog\. [or] rewritecond %{request_uri} ^/blog [nc] rewriterule ^ /blog/index.php [l] 

Comments

Popular posts from this blog

database - VFP Grid + SQL server 2008 - grid not showing correctly -

jquery - Set jPicker field to empty value -

.htaccess - htaccess convert request to clean url and add slash at the end of the url -