Alert icon
We're changing our privacy policy. This stuff matters.  Learn more  Dismiss

Htaccess and Redirects for Dummies

Loading...

Sign in or sign up now!
12,290
Loading...
Alert icon
Sign in or sign up now!
Alert icon

Uploaded by on Apr 7, 2008

http://www.matthewbredel.com/166/htaccess-and-redirects-for-dummies.html

(more instructions below...)

One of the most powerful, yet simple manipulations that can be done with your htaccess file is a basic redirect function.

A .htaccess file resides in the web-root directory of most Linux servers that have Apache installed (which is a majority of the servers online). This .htaccess file is a text file which contains user-defined server configuration settings, which include URL manipulations.

The simple and most common configuration setting is the redirect. Using this function, you can create pseudo directories and files on your local host that will redirect to other URLs. This can be used to hide (or cloak) affiliate links and manage the file linking structure of your website more efficiently.

The syntax is simple:

redirect {local/pseudo location} {destination URL}

Example:

redirect /google http://www.google.com

If this htaccess file resides on my blog at http://www.matthewbredel.com and I typed in:

http://www.matthewbredel.com/google

My host will redirect the user to:

http://www.google.com

Category:

Howto & Style

Tags:

License:

Standard YouTube License

  • likes, 9 dislikes

Link to this comment:

Share to:

Uploader Comments (MatthewBredel)

  • didnt know they exported that beer to the US but there ya go. Anyways Hi from Perth Western Australia. Cheers mate.

  • @stdavross666 Actually, I lived in Sydney for about 2 years (and I married an Aussie, too, which helps!) :-)

  • ARE YOU WEARING A VICTORIA BITTER T SHIRT?

  • @stdavross666 MMMM...VB! (yes, though I'm a Toohey's guy myself!)

  • Full details about the code referenced in the video can be found under (more info) on the right (above the description). cheers...matt

see all

All Comments (14)

Sign In or Sign Up now to post a comment!
  • Excellent information.

  • How do I keep a web folder private? I want to prevent web bots from listing the contents of one of my folders. I'm guessing it has to do with .htaccess?

  • @MatthewBredel ah I see

  • hey... how do i link my google domain to another personal website

  • @kevinlmanon hey kevin all you have to do its rename the text file to .htaccess and once you have your link re-direct written in the note pad then you can save it as a .txt file and add it to you'r root file hope this helps a little bit

  • Thank you. Works!

Loading...
0 / 00Unsaved Playlist Return to active list
    1. Your queue is empty. Add videos to your queue using this button:
      or sign in to load a different list.
    Loading...Loading...Saving...
    • Clear all videos from this list
    • Learn more