We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 53920
    • 1 Posts
    Hello!
    I need to create subdomains for a website running on Revo 2.5.7-pl, the site is using the shared hosting. PHP version is 5.6, the server is Apache.
    Each subdomain should be same as domain except the main page, the main page should have customizable title and meta description. Total amount of subdomains should be around 20, it would be perfect if subdomains could be added from .csv or .xlsx file.

    I have copied the web context and filled in required context settings: base_url, http_host, site_start and site_url for that subdomain, and I have created subdomain on hosting with path to the folder public_html/subdomainName.domainName.com, then I copied config.core.php, index.php and .htaccess files from ModX install on domain and edited them as said in this guide https://docs.modx.com/revolution/2.x/administering-your-site/contexts/creating-a-subdomain-from-a-folder-using-virtual-hosts but when I finished only HTML was loading because assets folder was in domain folder and links were relative, also page was loading infinitely. I had fiddled with .htaccess file and managed to load assets from domain folder, so page is displaying somewhat correctly, but page loading is infinite and it has serious effect on hosting - processor is used for 100% and after 5-10 minutes of browsing the subdomain server falls displaying Resouce limit error.
    Here is .htaccess code
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_URI} !^assets/
    RewriteRule ^assets/(.*)$ http://profildoors-market.by/assets/$1 [L,NC]
    RewriteRule ^(.*)$ index.php?q=$1 [L,QSA]

    In the top of .htaccess has, everything else is commented with # in the start of the line
    RewriteEngine On
    RewriteBase /
    

    Subdomain URL is http://test.profildoors-market.by/, please stop loading manually when visible content is loaded.
    Are there any better way for creating subdomains like this, or at least fix for .htaccess code?

    Sorry for my English. Thank you in advance, Daniar.