iEntry 10th Anniversary Forum Rules Search
WebProWorld
Register FAQ Calendar 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.

Share Thread: & Tags

Share Thread:

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 07-15-2008, 12:57 PM
WebProWorld New Member
 
Join Date: Jul 2003
Location: Bay Area, CA
Posts: 9
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?
Reply With Quote
  #2 (permalink)  
Old 07-15-2008, 03:50 PM
incrediblehelp's Avatar
WebProWorld 1,000+ Club
WebProWorld MVP
 
Join Date: Jan 2004
Location: Live in Cincy Now
Posts: 7,573
incrediblehelp RepRank 4incrediblehelp 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, 06:00 PM
WebProWorld New Member
 
Join Date: Jul 2003
Location: Bay Area, CA
Posts: 9
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
Reply With Quote
  #4 (permalink)  
Old 07-15-2008, 06:32 PM
wige's Avatar
Moderator
WebProWorld Moderator
 
Join Date: Jun 2006
Location: United States
Posts: 2,648
wige RepRank 9wige RepRank 9wige RepRank 9wige RepRank 9wige RepRank 9wige RepRank 9wige RepRank 9wige RepRank 9wige RepRank 9wige RepRank 9wige RepRank 9
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.
Reply With Quote
  #5 (permalink)  
Old 07-15-2008, 06:44 PM
WebProWorld New Member
 
Join Date: Jul 2003
Location: Bay Area, CA
Posts: 9
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!
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

BB 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 09:01 AM
301 redirect of .doc files pdrew Search Engine Optimization Forum 8 08-28-2007 11:35 AM
301 redirect when promoting directory to new domain holmpage Google Discussion Forum 0 12-18-2006 11:14 PM
Pitfalls of Allowing Directory Sublistings on Website Files maxsun Search Engine Optimization Forum 2 09-18-2006 11:39 AM
Please help - 301 redirect a directory .htaccess African-Safari Search Engine Optimization Forum 1 10-05-2005 11:46 AM


All times are GMT -4. The time now is 12:56 AM.



Search Engine Optimization by vBSEO 3.3.0