I have an addon domain (addon.com) on my main account (main.com). Most files work fine, like html files will go to the addon domain (addon.com/test.html). However, PHP files redirect to a subfolder of the main domain. For example, I put test.php in the folder for addon.com, and when I access it in the browser it redirects to
main.com/addon.com/test.php
instead of
addon.com/test.php
Is this something that I need to set in my .htaccess? Below is the .htaccess file in the main public_html directory. BTW I am using hostgator as a host.
.htaccess:
<IfModule mod_rewrite.c>
RewriteEngine On
# Unless directory, remove trailing slash
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^([^/]+)/$ http://dailydoge.com/$1 [R=301,L]
# Redirect external .php requests to extensionless url
RewriteCond %{THE_REQUEST} ^(.+)\.php([#?][^\ ]*)?\ HTTP/
RewriteRule ^(.+)\.php$ http://dailydoge.com/$1 [R=301,L]
# Resolve .php file for extensionless php urls
RewriteRule ^([^/.]+)$ $1.php [L]
</IfModule>