Small htaccess tweak

  • MasterZ
  • Expert
  • Expert
  • User avatar
  • Joined: Dec 04, 2004
  • Posts: 699
  • Loc: Colorado Springs
  • Status: Offline

Post January 31st, 2009, 3:40 am

Hey guys, quick question.

I'm setting up a page for my podcast, and I need to redirect all incoming links to a subfolder without breaking my links to my podcast files.

Here is my directory structure:
/.htaccess
/podcast.xml
/podcast1.mp3
/podcast2.mp3
/site/index.php

I already have my site established as /site so I don't want to move it to root, how do I redirect traffic to /site without breaking access to the xml or mp3 files?

Thanks everyone.
Image Eternal Truth Ministry - Biblical Resources, Forums
Have mercy on me, O God, according to your unfailing love; according to your great compassion blot out my transgressions. - Psalm 51:1 http://www.zssites.net - ZS Sites Web Hosting
  • Anonymous
  • Bot
  • No Avatar
  • Joined: 25 Feb 2008
  • Posts: ?
  • Loc: Ozzuland
  • Status: Online

Post January 31st, 2009, 3:40 am

  • joebert
  • Sledgehammer
  • Genius
  • No Avatar
  • Joined: Feb 10, 2004
  • Posts: 13455
  • Loc: Florida
  • Status: Offline

Post January 31st, 2009, 7:02 am

You setup the rewrite like you normally would, but you add at least one RewriteCond above the RewriteRule that excludes rewrites when the REQUEST_URI matches /podcast([0-9]*\.mp3|\.xml) or depending on what else you have going on, something similar.

Code: [ Select ]
RewriteCond %{REQUEST_URI} !^/podcast([0-9]*\.mp3|\.xml)
RewriteRule ...
  1. RewriteCond %{REQUEST_URI} !^/podcast([0-9]*\.mp3|\.xml)
  2. RewriteRule ...
Strong with this one, the sudo is.

Post Information

  • Total Posts in this topic: 2 posts
  • Users browsing this forum: Bigwebmaster and 221 guests
  • You cannot post new topics in this forum
  • You cannot reply to topics in this forum
  • You cannot edit your posts in this forum
  • You cannot delete your posts in this forum
  • You cannot post attachments in this forum
 
cron
 

© 2011 Unmelted, LLC. Ozzu® is a registered trademark of Unmelted, LLC.