A
A
Artem Tyumentsev2015-10-26 17:08:18
CMS
Artem Tyumentsev, 2015-10-26 17:08:18

How to create a subdomain for a WordPress page?

I have a domain running WordPress. You need to make subdomains for certain pages, blog and wordpress store. I wrote in .htaccess

RewriteCond %{REQUEST_URI} ^/(shop|blog)/
RewriteRule ^([^/]*)/(.*)$ http://$1.example.com/$2 [R=301,L]

There is just a redirect to a non-existent subdomain.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
Aleks Front, 2015-10-26
@AleksFront

If it's site.com/subsite/
Then for site.com/blog (on Wp)
Did this
in .htaccess
# BEGIN WordPress
RewriteEngine On
RewriteBase /subsite/
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME } !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /subsite/index.php [L]

G
gut, 2018-03-16
@gut

Did you succeed? I also need a subdomain, which I opened and hung on the main WP site, to redirect to a specific page on this site.
tax.domen.ru -> domen.ru/tax-page-adress

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question