I'm trying to install Wordpress in a subdomain on a shared hosting.
Me and my father have a domain together - artazov.cz
. I have my own subdomain michal.artazov.cz
. I want to go one level deeper and make a blog in the subdomain of the subdomain - blog.michal.artazov.cz
. Now, it shouldn't matter, how many levels deep I go if I match it directly with regular expression in .htaccess
. So that's what I did:
RewriteEngine on
RewriteCond %{REQUEST_URI} !^/?subdom/michal/subdom/blog/
RewriteCond %{HTTP_HOST} ^(www.)?blog\.michal\.artazov\.cz [NC]
RewriteRule ^(.*)$ http://artazov.cz/subdom/michal/subdom/blog/$1 [L,P]
There are 2 problems with this.
http://artazov/subdom/michal/subdom/blog
. Therefore every link on the website, including permalinks to articles, have this signature, instead of http://blog.michal.artazov.cz
. http://blog.michal.artazov.cz
, the website returns 404 Not Found and I have to go to database and change it back. Is there some way to set it up so it works and runs in the desired subdomain, including all the links, generated by Wordpress itself? Thanks
Perhaps you have attempted likely to: Configurations in Wordpress-Admin >> Media Configurations Then try altering both:
I think you may should try changing permalinks: http://codex.wordpress.org/Using_Permalinks
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.