.htaccess tutorial

htaccess Elite


Recognize only a specific directory and its files

Ask your mod_rewrite and Redirection questions here, and get answers!

Recognize only a specific directory and its files

New postby mozunk » 04 Mar 2008 01:03

What I have:
Code: Select all
Options +FollowSymLinks
RewriteEngine on

RewriteRule / index.php?1=$1
RewriteRule /blog index.php?1=$1

### end original ################################
### set timezone ################################
SetEnv TZ America/Indianapolis

### set server email ############################
ServerSignature EMail
SetEnv SERVER_ADMIN mozunk@gmail.com

### add trailing slash ##########################
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_URI} !(.*)/$
RewriteRule ^(.*)$ http://voolia.com/$1/ [R=301,L]

What I'm doing:
User inputs a url or RSS feed and I output a shorter url (like tinyurl but with a twist --see voolia.com)
These urls are set in the db and a user accesses their shorter url by going to voolia.com/CALLSIGN

Right now EVERYTHING except files in the home directory are redirected back to index.php.

What I want to do:
Add a single directory that is exempt from redirection.

Any help is appreciated :)
mozunk
 
Posts: 1
Joined: 04 Mar 2008 00:55
Location: Matewan, WV

Return to Redirect or Rewrite Questions