Note that there are some explanatory texts on larger screens.

plurals
  1. POApache mod_rewrite for a specific domain under same directory
    primarykey
    data
    text
    <p>I have wrote a website using PHP &amp; Yii Framework, and there I have my <code>.htaccess</code> file which has this <code>mod_rewrite</code> statement to use clean URL's:</p> <pre><code>Options +FollowSymLinks IndexIgnore */* RewriteEngine on RewriteCond %{REQUEST_FILENAME} -s [OR] RewriteCond %{REQUEST_FILENAME} -l [OR] RewriteCond %{REQUEST_FILENAME} -d RewriteRule ^.*$ - [NC,L] RewriteRule ^.*$ index.php [NC,L] </code></pre> <p>For example I use this domain: <code>www.example.com</code> &amp; <code>popstan.net</code>, and URL rewriting for these domains works <strong>like in a dream!</strong></p> <p>However, I'm now creating a blog, and with my Yii controllers I have this structure for accessing blog articles, blog categories and single blog article:</p> <ul> <li><a href="http://example.com/blog/" rel="nofollow">http://example.com/blog/</a> - lists all new articles</li> <li><a href="http://example.com/blog/category/some-category" rel="nofollow">http://example.com/blog/category/some-category</a> - list articles from specific category</li> <li><a href="http://example.com/blog/article/some-alias-path" rel="nofollow">http://example.com/blog/article/some-alias-path</a> - previews a single blog article</li> </ul> <p>Now, I wish to use this blog, but under domain: <code><a href="http://blog.example.com/" rel="nofollow">http://blog.example.com/</a></code>, and to maintain those URL structures, and I wish not to copy my website on two separate directoryies (ie. blog directory).</p> <p>Is it possible to use <code>mod_rewrite</code> to rewrite URL's for a domain, but to have the URL's be fetched from a parent directory?</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload