Welcome Guest ( Log In | Click here to Register a free account now! )
Welcome to Bleeping Computer, a free community where people like yourself come together to discuss and learn how to use their computers. Using the site is easy and fun. As a guest, you can browse and view the various discussions in the forums, but can not create a new topic or reply to an existing one unless you are logged in. Other benefits of registering an account are subscribing to topics and forums, creating a blog, and having no ads shown anywhere on the site.![]() ![]() |
Jun 23 2006, 08:52 PM
Post
#1
|
|
![]() Forum Regular ![]() ![]() ![]() Group: Members Posts: 245 Joined: 27-May 05 From: 127.0.0.1 Member No.: 21,516 |
How To Use The .htaccess File To Redirect Users Guide Overview The purpose of this guide is to teach you how to use the .htaccess file to redirect users to pages that you have modified, deleted, or moved. The .htaccess file is associated with Apache Servers. Not all web hosting services allow modification of this file. Before following this guide, contact your web hosting service provider to confirm that addition and/or modification to this file is allowed. Instructions
Redirection Notables 1. Be sure not to add "http://www" to the first part of the statement - just put the path from the top level of your site to the page. Also ensure that you leave a single space between these elements: redirect 301 (the instruction that the page has moved) /old/old.html (the original folder path and file name) http://www.new.com/new.html (new path and file name) 2. Each page being redirected needs to occupy it's own line in the .htaccess file. Conclusion Be sure to test out your changes after you make them. If something does not work as intended, delete the entry, so it does not create any further problems, and refer to your web host for answers. -------------------- When I'm right, I'm right....
And when I'm wrong, I could have been right.... So I'm still right, cause I could have been wrong. |
|
|
|
Oct 28 2007, 11:45 PM
Post
#2
|
|
|
Senior Member ![]() ![]() ![]() ![]() Group: Members Posts: 567 Joined: 28-June 05 From: 300 Yards behind you, tracking you with a sniper scope Member No.: 25,107 |
Hi nosnhoj#3,
This seems to be a pretty well written and informative 'howto' that you have here. I am toying around with an Apache web server and this seems to be something that I need to learn more about. Up until a couple of days ago I didn't have a .htaccess file. Then while perusing an article on securing a server with a password I decided to give it a go and see what that was all about. I followed the instructions that were given to create a password file, htpasswd, and by the time that I had gotten through I had created both a htpasswd, and a .htaccess file. The .htaccess file looks like this --> AuthType Basic AuthName "WARNING!This Is A SECURE AREA, PLEASE LOG IN" AuthUserFile "c:\Documents and Settings\ADMIN\my_password_file.txt" AuthGroupFile /dev/null <Limit GET POST PUT> require valid-user </Limit> That sucker worked too OK, now I'm trying to figure out where to put it. According to the way that I'm understanding this --> NOTE: If you created the file, it is important that you upload the file to the Root Directory of your site, which is the directory where your default "index" or "home" page resides. <-- Then my path to that file should look something like this --> C:\Program Files\Apache Group\Apache2\htdocs\.htaccess <-- right? I mean because that's where the default index thingy is. Thanks for any insight Boo. ♥ Wendy -------------------- |
|
|
|
![]() ![]() |
| Lo-Fi Version | Time is now: 21st November 2009 - 09:15 PM |