Trac3 !! Posted September 10, 2010 Report Share Posted September 10, 2010 (edited) Sveiki. Mēģinu redirektēt visus domēna subdomēnus uz domēnu example.com, bet izveidojies cikls cik sapratu no logiem.. <VirtualHost *:80> DocumentRoot "/home/example.com" ServerName example.com DirectoryIndex index.php <Directory "/home/example.com"> Options FollowSymLinks Options -Indexes AllowOverride All Order allow,deny Allow from all </Directory> </VirtualHost> <VirtualHost *:80> ServerName www.example.com ServerAlias *.example.com RedirectMatch 303 (.*) http://example.com$1 </VirtualHost> Jau iepriekš paldies par atbildēm. Edited September 10, 2010 by Trac3 !! Link to comment Share on other sites More sharing options...
sheps Posted September 10, 2010 Report Share Posted September 10, 2010 ja sapratu ko veelies tad vajadzeetu buut saadi Options +FollowSymlinks RewriteEngine on RewriteCond %{HTTP_HOST} !^www.example.lv$ RewriteRule ^\/?(.*)$ http://www.example.lv/$1 [R=301,L] Link to comment Share on other sites More sharing options...
Trac3 !! Posted September 10, 2010 Author Report Share Posted September 10, 2010 Tik tālu esmu ticis, bet nestrādā vēl.. :/ <VirtualHost *:80> DocumentRoot "/home/example.com" ServerName example.com DirectoryIndex index.php <Directory "/home/example.com"> Options FollowSymLinks Options -Indexes AllowOverride All Order allow,deny Allow from all </Directory> </VirtualHost> <VirtualHost *:80> ServerAlias *.example.com Options +FollowSymlinks RewriteEngine on RewriteCond %{HTTP_HOST} ^([^\.]+)\.example\.com RewriteRule ^(.*)$ http://example.com/$1 [R=301,L] </VirtualHost> Link to comment Share on other sites More sharing options...
Trac3 !! Posted September 10, 2010 Author Report Share Posted September 10, 2010 <VirtualHost *:80> DocumentRoot "/home/example.com" ServerName example.com DirectoryIndex index.php <Directory "/home/example.com"> Options FollowSymLinks Options -Indexes AllowOverride All Order allow,deny Allow from all </Directory> </VirtualHost> <VirtualHost *:80> ServerName www.example.com ServerAlias *.example.com RewriteEngine on RewriteCond %{HTTP_HOST} !^example\.com$ [NC] RewriteRule ^/(.*)$ http://example.com/$1 [R=301,L] </VirtualHost> Šis ir mans gala variants, kas strādā. :) Link to comment Share on other sites More sharing options...
Recommended Posts