• Hi

    Usually I have been messing around with one script per domain but now I have got two scripts on the same domain and am having htacess issues

    on mydomain.com I have a script and on mydomain.com/blog I have wordpress.

    for the main domain the offending htaccess code seems to be:

    Options +FollowSymLinks
    RewriteEngine On
    RewriteBase /

    RewriteCond %{HTTP_HOST} ^mydomain\.com$ [NC]
    RewriteRule ^(.*)$ http://www.mydomain.com/$1 [R=301,L]

    RewriteCond %{THE_REQUEST} ^.*/index.php [NC]
    RewriteRule ^(.*)index.php$ http://www.mydomain.com/$1 [R=301,L]

    and when you visit the site at mydomain.com.blog you get this error:

    Warning: Unexpected character in input: ‘ in /usr/bin/php5-cgi on line 4009

    Warning: Unexpected character in input: ” (ASCII=4) state=1 in /usr/bin/php5-cgi on line 4009

    Parse error: syntax error, unexpected ‘$’ in /usr/bin/php5-cgi on line 4009

    and the url changes to mydomain.com/cgi-bin/php/blog

    Only when I remove the htaccess code on the main domain does wordpress in the subdirectory function correctly.

    Anyone know how to get around this problem?

    Thanks

    B

  • The topic ‘htaccess issues with root htaccess rules?’ is closed to new replies.