Question

Background

i have a website running on wordpress and all its files are located in public_html of my host. Within it i created a sub domain "phantomomaga" and redirected an other domain to that sub domain to make it "www.phantomomaga.tk" instead of "phantomomaga.my-domain.com" for this i added some code to the .htaccess of my public_html as told here to make it like follow

Code

# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>

# END WordPress

#Fix missing trailing slash character on folders.
RewriteRule ^([^.?]+[^.?/])$ $1/ [R,L]

#www.phantomomaga.tk and phantomomaga.tk will map to the folder {root}/phantomomaga/
RewriteCond %{HTTP:Host} ^(?:www\.)?phantomomaga\.tk$
RewriteCond %{REQUEST_URI} !^/phantomomaga/
RewriteRule ^(.*) phantomomaga/$1 [NC,L,NS]

Problem

Due to this edit i was able to achieve what i wanted but for some reason not known to me now the permalink of my subdomain is not working and i keep getting not found errors from my wordpress install that is in my root folder and if i remove

# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>

# END WordPress 

from the .htaccess the sub domain works perfectly but the root one messes up so i think the problem is with the .htaccess of either of root or sub domain and i cant figure out the solution even after i googled it so please help.

No correct solution

Licensed under: CC-BY-SA with attribution
Not affiliated with wordpress.stackexchange
scroll top