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

C# random value from dictionary and tuple -

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

cgi - How do I interpret URLs without extension as files rather than missing directories in nginx? -