• Our team is looking to connect with folks who use email services provided by Plesk, or a premium service. If you'd like to be part of the discovery process and share your experiences, we invite you to complete this short screening survey. If your responses match the persona we are looking for, you'll receive a link to schedule a call at your convenience. We look forward to hearing from you!
  • The BIND DNS server has already been deprecated and removed from Plesk for Windows.
    If a Plesk for Windows server is still using BIND, the upgrade to Plesk Obsidian 18.0.70 will be unavailable until the administrator switches the DNS server to Microsoft DNS. We strongly recommend transitioning to Microsoft DNS within the next 6 weeks, before the Plesk 18.0.70 release.
  • The Horde component is removed from Plesk Installer. We recommend switching to another webmail software supported in Plesk.

Subdomain rewriting problem

keny

New Pleskian
Hi,

i am trying to rewrite subdomain
http://anysubdomain.mydomain.com to http://www.mydoamin.com/web/index.php?site=anysubdomain

I have create a wildcard subdomain correctly

I have create vhost.conf whit this :

<IfModule mod_rewrite.c>
# Turn on the rewrite engine
RewriteEngine on
# Make sure all input is lowercase for comparison
RewriteMap lowercase int:tolower

# All sub names to be matched
ServerAlias *.mydomain.com

# Not index.php requested
RewriteCond %{REQUEST_URI} !^/index.php

# Not www. requested
RewriteCond %{HTTP_HOST} !^www.mydomain.com$

# subname present in request
RewriteCond %{HTTP_HOST} ^(.+).mydomain.com

# Do the PROXY redirect to preserve the browser URL
RewriteRule .* http://www.mydomain.com/web/index.php?site=%1 [L,P]
</IfModule>

Then
/usr/local/psa/admin/bin/websrvmng -u --vhost-name=mydomain.com
and restart apache

when i try it i get error 403
You don't have permission to access / on this server.

Additionally, a 403 Forbidden error was encountered while trying to use an ErrorDocument to handle the request

Yes this address work : http://www.mydomain.com/web/index.php?site=anysite

Anyone ?

Thanks you very much !!!!
 
Back
Top