[TUT] Read this if you want to access your site with/without 'www'

SpaceshipSpaceship
Watch

pesst

Established Member
Impact
3
Hello, I was wondering how to set .htaccess file for that purpose... now here is my simple tutorial:

Steps:

1º) Create a text file named htaccess.txt

2º) Edit it with the following code:

RewriteEngine On
RewriteCond %{HTTP_HOST} ^YourSite\.com [nc]
RewriteRule (.*) http://www.YourSite.com/$1 [R=301,L]


3º) Change "YourSite" for yours (and .com extension if you are using another one)

4º) Upload this file to root folder and rename it with .htaccess

5º) If you already got that file, then just add the code.

This can be useful :p
 
0
•••
The views expressed on this page by users and staff are their own, not those of NamePros.
GoDaddyGoDaddy
Dynadot — .com TransferDynadot — .com Transfer
Appraise.net

We're social

Escrow.com
Spaceship
Rexus Domain
CryptoExchange.com
Domain Recover
CatchDoms
DomainEasy — Live Options
DomDB
  • The sidebar remains visible by scrolling at a speed relative to the page’s height.
Back