tmyonline Posted February 29, 2008 Share Posted February 29, 2008 Hi guys: I need to re-direct requests for "http://www.information.domain.tld/*" to "http://information.domain.tld/*". How should I configure the .htaccess file to make this happen? I appreciate your help. Thanks. Quote Link to comment Share on other sites More sharing options...
grglaz Posted March 1, 2008 Share Posted March 1, 2008 1. In the directory you want to redirect, create (or edit if it already exists) the .htaccess file. Note the leading dot which is required. 2. In one complete line, without any additional line feeds, enter the direct command. The redirect command has the following format: redirect status old-url new-url - Status is optional and may be one of the following: permanent - (301) resource has moved permanently. temp - (302). resource has moved temporarily. seeother - (303) resource has been replaced. gone - (410) resource has been permanently removed. (When this status is used the new-url argument should not be used.) 3. Save the file 4. If you created the file, you may need to set the permissions to be web readable. If you have access to the chmod command then type chmod 664 .htaccess. an example for .htaccess file would contain the line redirect permanent /techrx/test http://new_url/ change the "/techrx/test" with the path you want to redirect change the "http://new_url/" with the new url Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.