WebProWorld Part of WebProNews.com
Page One Link To Us Edit Profile Private Messages Archives FAQ RSS Feeds  
 

Go Back   WebProWorld > Webmaster, IT and Security Discussion > Web Programming Discussion Forum
Subscribe to the Newsletter FREE!


Register FAQ Members List Calendar Arcade Chatbox Mark Forums Read

Web Programming Discussion Forum Working with an API? Developing a plugin? Writing a Mod or script for your favorite blog, Web 2.0 site or Forum? Welcome.

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 07-15-2008, 11:57 AM
adenjo's Avatar
WebProWorld New Member
 

Join Date: Jul 2003
Location: Bay Area, CA
Posts: 12
adenjo RepRank 0
Question How to Redirect a Directory and all sub files

I'm having trouble trying to redirect a directory we are no longer going to use.

Right now we want everything inside http://www.lautenaudio.com/techniques/ including URL's like "http://www.lautenaudio.com/techniques/faq.php?category_id=8&cat_name=Acoustic%20Guitar" to be redirected to Lauten Audio Recording Sessions - Microphone placement, techniques and sound samples

I've tried doing this in our .htaccess file, however the redirect takes the "faq.php?category_id=8&cat_name=Acoustic%20Gui tar" and adds it to the end of the lauten-sessions.htm file, like this http://www.lautenaudio.com/lauten-se...ustic%20Guitar.

This obviously creates a 404 error.

Can someone help guide me how to corretly infigure our .htaccess file or perhaps another way to do this redirect?
__________________
Brian
Louchen, LLC
Reply With Quote
  #2 (permalink)  
Old 07-15-2008, 02:50 PM
incrediblehelp's Avatar
Moderator
WebProWorld Moderator
 

Join Date: Jan 2004
Location: Live in Cincy Now
Posts: 7,597
incrediblehelp RepRank 4incrediblehelp RepRank 4incrediblehelp RepRank 4incrediblehelp RepRank 4
Default Re: How to Redirect a Directory and all sub files

Can you post the redirect code?
Reply With Quote
  #3 (permalink)  
Old 07-15-2008, 05:00 PM
adenjo's Avatar
WebProWorld New Member
 

Join Date: Jul 2003
Location: Bay Area, CA
Posts: 12
adenjo RepRank 0
Default Re: How to Redirect a Directory and all sub files

There is no "code" persay since it is within the .htaccess file. From what I understand this file some how communicates with Apache and tells it to redirect.

Here is the line I am using right now inside the .htaccess file

Redirect /techniques Lauten Audio Recording Sessions - Microphone placement, techniques and sound samples


If you click on the link below you will see the redirect URL result which adds the faq.php?...

http://www.lautenaudio.com/technique...&category_id=6
__________________
Brian
Louchen, LLC
Reply With Quote
  #4 (permalink)  
Old 07-15-2008, 05:32 PM
wige's Avatar
Moderator
WebProWorld Moderator
 

Join Date: Jun 2006
Location: United States
Posts: 1,722
wige RepRank 4wige RepRank 4wige RepRank 4wige RepRank 4
Default Re: How to Redirect a Directory and all sub files

The easiest way to accomplish the redirect should be the following line:

RedirectMatch 301 ^/techniques/.*$ http://www.lautenaudio.com/lauten-sessions.htm
__________________
The best way to learn anything, is to question everything.
Interestingly Average Security Blog
Reply With Quote
  #5 (permalink)  
Old 07-15-2008, 05:44 PM
adenjo's Avatar
WebProWorld New Member
 

Join Date: Jul 2003
Location: Bay Area, CA
Posts: 12
adenjo RepRank 0
Default Re: How to Redirect a Directory and all sub files

Quote:
Originally Posted by wige View Post
The easiest way to accomplish the redirect should be the following line:

RedirectMatch 301 ^/techniques/.*$ Lauten Audio Recording Sessions - Microphone placement, techniques and sound samples


Awesome! Now it works, exactly what I needed. Thank you Wige!
__________________
Brian
Louchen, LLC
Reply With Quote
Reply

  WebProWorld > Webmaster, IT and Security Discussion > Web Programming Discussion Forum


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Redirect a lot of files using a wildcard? memaggiem IT Discussion Forum 4 04-24-2008 08:01 AM
301 redirect of .doc files pdrew Search Engine Optimization Forum 8 08-28-2007 10:35 AM
301 redirect when promoting directory to new domain holmpage Google Discussion Forum 0 12-18-2006 10:14 PM
Pitfalls of Allowing Directory Sublistings on Website Files maxsun Search Engine Optimization Forum 2 09-18-2006 10:39 AM
Please help - 301 redirect a directory .htaccess African-Safari Search Engine Optimization Forum 1 10-05-2005 10:46 AM


Search Engine Optimization by vBSEO 3.2.0