URL redirection using .htaccess

Step 1 :Search for .htaccess file on the server.(Cpanel)

Step 2: Check hidden files (under settings) to show all hidden files.

Step 3: If No .htaccess found,

  • Create a htaccess.txt file in local machine (without “.” – as this may prevent upload using cpanel) ,
  • Upload using cpanel, and
  • then rename htaccess.txt to .htaccess

Step 4: Copy the following text to direct all calls from

from phoenixtravelsautralia.com.au ==>>  www.phoenixtravelsaustralia.com.au
#Force www:
RewriteEngine on
RewriteCond %{HTTP_HOST} ^phoenixtravelaustralia.com.au [NC]
RewriteRule ^(.*)$ http://www.phoenixtravelaustralia.com.au/$1 [L,R=301,NC]

 

OR do the following

Step 5:

# If your site can be accessed both with and without the ‘www.’ prefix, you
# can use one of the following settings to redirect users to your preferred
# URL, either WITH or WITHOUT the ‘www.’ prefix. Choose ONLY one option:

# To redirect all users to access the site WITH the ‘www.’ prefix,
# (http://example.com/foo will be redirected to http://www.example.com/foo)
# uncomment the following:
RewriteCond %{HTTP_HOST} .

RewriteCond %{HTTP_HOST} !^www\. [NC]
RewriteRule ^ http%{ENV:protossl}://www.%{HTTP_HOST}%{REQUEST_URI} [L,R=301]

 

helping link:

http://www.inmotionhosting.com/support/website/htaccess/force-www-htaccess

HTML Form Elements

 

<html>
 <body bgcolor="yellow">
 <h1> Html Form Controls</h1>
 Text Box:<input type="text" placeholder="Enter your name" maxlength="10" size="100" name="full_name"/*php*/ id="full_name" readonly="readonly",disabled="disabled" value="Hello India">
 <br><br>
 Password:<input type="password" placeholder="Enter Password" maxlength="8">
 <br><br>
 Text Area:<br><textarea cols="10" rows="10"></textarea><br><br>
 Select:<select name="city" id="city">
 <option value="">Choose city</option>
 <option value="Bangalore">Bangalore</option>
 <option value="Chennai">Chennai</option>
 <option value="Delhi">Delhi</option>
 </select><br><br>
 checkbox:<input type="checkbox" name="item1" value="item1">mango
 <input type="checkbox" name="item1" value="item1">Orange
 <br><br>
 RadioButton:<input type="radio" name="male" value="M">male
 <input type="radio" name="male" value="M">female
 <br><br>
 File Upload:<input type="file" name="resume" id="resume">
 <br><br>
 <button type="submit">Submit button</button>
 <button type="reset">Reset button</button>
 </body>
</html>