Reputation: 1137
Following .htaccess doesn't work for root level page.
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^demo\-blog/(.*)$ demo\-blog/index.php/$1 [L]
If I access http://example.com/demo-blog/blog/publish.html then it works by executing file on http://example.com/demo-blog/index.php/blog/publish.html but when I access http://example.com/demo-blog/ it doesn't load the page from http://example.com/demo-blog/index.php. The .htaccess file is on the domain root. http://example.com/
Please let me know why it doesn't rewrite the url for the home page.
Upvotes: 3
Views: 262
Reputation: 785276
Change your rule to this:
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^demo-blog(/.*|)$ demo-blog/index.php/$1 [L,NC]
Upvotes: 2