Jump to content
The Uniform Server Community

uniform server 5.6.7-nano ?redirect?


jeret
 Share

Recommended Posts

Hi i have successfully, configured and made my web online. i have setup the virtual host:

Now i want to redirect all my non www webaddress to www. How do i do this?

 

i have even edited the .htaccess in my uniserver/www/ with few different config but it's still not working.

 

please help:

 

RewriteEngine On

RewriteCond % ^lourdes.com.my [NC]

RewriteRule ^(.*)$ http://www.lourdes.com.my/$1 [L,R=301]

------------------------------------------------------------------------------------------------------------------

RewriteEngine On

RewriteCond %{HTTP_HOST} !^www\.

RewriteRule ^(.*)$ http://www.%{HTTP_HOST}/$1 [R=301,L]

------------------------------------------------------------------------------------------------------------------

##########VIRTUAL HOST SETUP##########

# WWW.AMPANGPOINT.COM.MY

<VirtualHost *>

ServerName www.ampangpoint.com.my

DocumentRoot C:/UniServer/www/asb

</VirtualHost>

 

##########VIRTUAL HOST SETUP##########

# WWW.AMPANGSUPERBOWL.COM

<VirtualHost *>

ServerName www.ampangsuperbowl.com

DocumentRoot C:/UniServer/www/asb

</VirtualHost>

 

##########VIRTUAL HOST SETUP##########

# WWW.REDALERTCARD.COM.MY

<VirtualHost *>

ServerName www.redalertcard.com.my

DocumentRoot C:/UniServer/www/redalert

</VirtualHost>

Jeret Christopher WEB DESIGNER
Link to comment
Share on other sites

Have you tried using ServerAlias for example:

 

##########VIRTUAL HOST SETUP##########

# WWW.AMPANGSUPERBOWL.COM

<VirtualHost *>

ServerName www.ampangsuperbowl.com

ServerAlias ampangsuperbowl.com *.ampangsuperbowl.com

DocumentRoot C:/UniServer/www/asb

</VirtualHost>

Link to comment
Share on other sites

Have you tried using ServerAlias for example:

 

##########VIRTUAL HOST SETUP##########

# WWW.AMPANGSUPERBOWL.COM

<VirtualHost *>

ServerName www.ampangsuperbowl.com

ServerAlias ampangsuperbowl.com *.ampangsuperbowl.com

DocumentRoot C:/UniServer/www/asb

</VirtualHost>

 

 

hi Coral, it's not working either, i tried this way instead and it's working :

 

<VirtualHost *>

DocumentRoot C:/uniserver/www/asb

ServerName www.ampangsuperbowl.com

</VirtualHost>

 

<VirtualHost *>

DocumentRoot C:/uniserver/www/asb

ServerAlias ampangsuperbowl.com

Redirect permanent / http://www.ampangsuperbowl.com

</VirtualHost>

 

but above don't seem to with extensions like "com.my" ex: www.lourdes.com.my

Jeret Christopher WEB DESIGNER
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

×
×
  • Create New...