HOT
Adri Blog
No Result
View All Result
Adri Blog
No Result
View All Result
Home Lainnya

Membuat Redirect dengan .htacces

adri by adri
March 28, 2012
in Lainnya
384 16
0
550
SHARES
2.5k
VIEWS
Share di FacebookShare di TwitterShare di Whatsapp

READ ME FIRST
As a configuration file, .htaccess is very powerful. Even the slightest syntax error (like a missing space) can result in your content not displaying correctly or at all.

Since .htaccess is a hidden system file, please make sure your FTP client is configured to show hidden files. This is usually an option in the program’s preferences/options.

Instructions
1. Create an empty text file using a text editor such as notepad, and save it as htaccess.txt.

NOTE:
The reason you should save the file as htaccess.txt is because many operating systems and FTP applications are unable to read or view .htaccess files by default. Once uploaded to the server you can rename the file to .htaccess.
2. Edit the contents of the file. Check the following examples:

Point an entire site to a different URL, such as domain.net redirected to domain.com:

# This allows you to redirect your entire website to any other domain
Redirect 301 / http://example.com/

Redirect index.html to a specific subfolder:

# This allows you to redirect index.html to a specific subfolder
Redirect /index.html http://example.com/newdirectory/

Redirect an old file to a new file path:

# Redirect old file path to new file path
Redirect /olddirectory/oldfile.html http://example.com/newdirectory/newfile.html
Redirect to a specific index page:

# Provide Specific Index Page (Set the default handler)
DirectoryIndex index.html

3. Upload this file and re-name it to .htaccess.

NOTE:
If using a text editor, be sure to save the file as plain text.
Paths to where you should save this file can be found in this article: System paths.
The definitive guide on Apache directives that can be used in .htaccess files can be found here: http://httpd.apache.org/docs/mod/core.html.
More powerful URL changes with mod_rewrite

Baca Juga :   Cara Mudah Kampanye Caleg Dengan Facebook dan Instagram 

If you need to make complex changes to the way your URL displays, you should visit Using .htaccess rewrite rules. You can do things like add “www” to the beginning of your URL, redirect all requests to a subfolder but keep the rest of the URL, etc.

Continue Reading
adri

adri

Perkenalkan, Saya Biasa di Sapa ADRI, Sehari2 Saya Berkuli di Komputer dengan Akses Internet 24 Jam Sehari Semalam (Tapi Tidak Selalu Online 24 Jam).

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

We bring you the best Premium WordPress Themes that perfect for news, magazine, personal blog, etc. Check our landing page for details.

Follow Us

Recent News

rental mobil pekanbaru

7 Armada Rental Mobil Pekanbaru Terbaik dan Termurah

December 28, 2020
Wow, Review Samsung Galaxy F41, Paket Yang lengkap

Spesifikasi Samsung Galaxy F41

November 23, 2020

Categories

  • Design
  • Download
  • Internet
  • Lainnya
  • Linux
  • Review
  • Wordpress
  • About
  • Contact
  • Disclaimer
  • Privacy Policy
  • SiteMap
  • TOS

© 2020 Personal Blog - adriyanto by AdriBlog.

No Result
View All Result
  • Home
  • Design
  • Internet
  • Download
  • Lainnya
  • Linux
  • Review
  • WordPress

© 2020 Personal Blog - adriyanto by AdriBlog.

Welcome Back!

OR

Login to your account below

Forgotten Password?

Create New Account!

OR

Fill the forms below to register

All fields are required. Log In

Retrieve your password

Please enter your username or email address to reset your password.

Log In