title: move all root domain url to subdirectory
body: <p>hi everyone i am new to stackoverflow and not php developer</p>
  
  <p>i am trying to move my wordpress site to subdirectory</p>
  
  <p>example: http: //blog.site.com -> http: //blog.site.com/blog</p>
  
  <p>i did some google and found some code for htaccess file </p>
  
  <pre><code>RewriteEngine On
  RewriteCond %{HTTP_HOST} ^(www.)?blog.site.com$
  RewriteRule ^(/)?$ blog [L]
  </code></pre>
  
  <p>this redirecting my home page to http: //blog.site.com/blog.
  but not<br/>
  http: //blog.site.com/index.php/category/pageName/</p>
  
  <p>now after more doing more google i got one more code for htaccess</p>
  
  <pre><code>RewriteEngine on
  RewriteCond %{HTTP_HOST} ^(www.)?blog.site.com$ [NC]
  RewriteCond %{REQUEST_URI} !^/blog/
  RewriteCond %{REQUEST_FILENAME} !-f
  RewriteCond %{REQUEST_FILENAME} !-d
  RewriteRule ^(.*)$ /blog/$1
  RewriteCond %{HTTP_HOST} ^(www.)?blog.site.com$ [NC]
  RewriteRule ^(/)?$ blog/index.php [L]
  </code></pre>
  
  <p>using this code
  http: //blog.site.com/index.php/category/pageName/
  is reading response from<br/>
  http: //blog.site.com/blog/index.php/category/pageName/
  but not redirecting </p>
  
  <p>I want to redirect all url
  example 
  http: //blog.site.com/........ --> http: //blog.site.com/blog/......</p>
  
  <p>Help me... Thanks....</p>