Portál AbcLinuxu, 4. listopadu 2025 06:48
# Rewrite subdomain requests to subdirectories except for www.example.com
RewriteEngine On
RewriteCond %{REQUEST_URI} !^/sd_
RewriteCond %{HTTP_HOST} !^www\.example\.com$ [NC]
RewriteCond %{HTTP_HOST} ^([^.]+)\.example\.com
RewriteRule (.*) /sd_%1/$1 [L]
#
# Redirect direct user-agent requests for www.example.com/sd_{subdomain}/{page} to http://{subdomain}.example.com/{page}
RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /sd_(.+)\ HTTP/
RewriteRule ^sd_([^/]+)/(.*)$ http://$1.example.com/$2 [R=301,L]
NN
            V hodně CMS se nastavuje základní URL adresa stránek, která se světe div se skládá ze URL a částečně z adresářové struktury. Zkus se podívat, jestli tam něco takového není, bylo by to asi ve tvaru "http://1.domena.tld/sub/1/"
        Tiskni
            
                Sdílej:
                
                
                
                
                
                
            
    
ISSN 1214-1267, (c) 1999-2007 Stickfish s.r.o.