So I’ve been struggling with this for a whole day and nothing helped so far.
I’ve got a PyroCMS installed in the root of the domain and a sub-domain blog in the same folder (public_html).
Now the problem is that when visiting http://dev.iber.co.uk/blog/ I’m seeing blog.iber.co.uk instead. Obviously that’s because the blog folder exists and it’s not just a url rewritten by htaccess.
The folder structure:
public_html
blog
.htaccess
.index.php
etc..
.htaccess
index.php
etc..
However if I remove the htaccess from blog folder dev.iber.co.uk/blog/ gets rewritten to index.php as it should.
Here’s the .htaccess for the dev.iber.co.uk(this sub-domain is actually pointing at root public_html folder):
Options +FollowSymLinks -Indexes
RewriteEngine on
RewriteBase /
RedirectMatch 403 ^/(system/cms/cache|system/codeigniter|.git|.hg).*$
RewriteCond %{HTTP_HOST} !^blog.iber.co.uk [NC]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php [L]
Here’s the .htaccess from the wordpress blog:
Options +FollowSymLinks -Indexes
RewriteEngine on
RewriteCond %{HTTP_HOST} ^blog.iber.co.uk [NC]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php [L]
What am I doing wrong? I have no access to rewrite log cause it’s a shared server. I will give 50 rep for anyone who helps me solve it.
Thanks
In the parent htaccess, would this solve your situation or is it a nescessity for you to have access to /blog/ path from the dev.domain ?