Posts: 6
Location: Bitburg, Germany
|
Hello all,
I have number of ReWrite rules in place, which for instance rewrites the URL for a users profile from:
mysite.com/uprofile?u=123
to:
mysite.com/username
The problem is I am trying to exclude certain directory's from these rules. For instance I have a blog under mysite.com/blog which I currently cannot access as it is redirecting me to an error page stating this username does not exist, which it obviously doesn't. lol
Here are the rules I have in place:
Code:
RewriteEngine on
Options +FollowSymlinks
RewriteCond %{REQUEST_URI} !/blog(/|$)
RewriteRule ^/?v/([a-zA-Z0-9]+)/(.*) embedXml.php?viewkey=$1
RewriteRule ^/?pl/([a-zA-Z0-9]+)/(.*) FLVplayer/flvplayer.swf
RewriteRule ^/?pv/(.*)/(.*) playerXml.php?flv=$1
RewriteRule ^/?watch/([a-zA-Z0-9]+)/(.*) view_video.php?viewkey=$1
RewriteRule ^/?([^/\.]+)(\/)?$ uprofile.php?uname=$1
RewriteRule ^/?([0-9]+)/(.*) category_detail.php?chid=$1
RewriteRule ^/?channels/(.*) groups_home.php?urlkey=$1
RewriteRule ^/?tags/(.*) search_result.php?search_id=$1
RewriteRule ^/?rss/new rss.php?type=new
RewriteRule ^/?rss/comments rss.php?type=comments
RewriteRule ^/?rss/views rss.php?type=views
RewriteRule ^/?([a-zA-Z0-9]+)(.srt) subtitles.php?video=$1
RewriteRule ^/?uploads/flvideo/([a-zA-Z0-9]+)(.srt) subtitles.php?video=$1
RewriteRule ^/?videos/all video.php?category=all
RewriteRule ^/?videos/recent video.php?category=mr
RewriteRule ^/?videos/viewed video.php?category=mv
RewriteRule ^/?videos/commented video.php?category=md
RewriteRule ^/?videos/favorites video.php?category=tf
RewriteRule ^/?videos/top video.php?category=tr
RewriteRule ^/?videos/featured video.php?category=rf
RewriteRule ^/?videos/adult video.php?category=al
RewriteRule ^/?videos/random video.php?category=rd
RewriteRule ^/?user/(.*)/videos/public uvideos.php?UID=$1&type=public
RewriteRule ^/?user/(.*)/videos/private uvideos.php?UID=$1&type=private
RewriteRule ^/?user/(.*)/favorites ufavour.php?UID=$1
RewriteRule ^/?user/(.*)/friends ufriends.php?UID=$1
RewriteRule ^/?user/(.*)/playlist uplaylist.php?UID=$1
RewriteRule ^/?user/(.*)/subscriptions ugroups.php?UID=$1
RewriteRule ^/?user/(.*)/subscribe uprofile.php?subscribe=on&UID=$1&info=i
RewriteRule ^/?user/(.*)/contact compose.php?receiver=$1
RewriteRule ^/?search/(.*)/related search_result.php?search_type=related&search_key=$1&sort=adddate
RewriteRule ^/?favor/(.*)/(.*) view_video.php?viewkey=$1&action=addfavour
RewriteRule ^/?share/(.*)/video share_video.php?v=$1
RewriteRule ^/?channel/videos/(.*)/(.*) gvideos.php?urlkey=$1&gid=$2
RewriteRule ^/?channel/members/(.*)/(.*) gmembers.php?urlkey=$1&gid=$2
RewriteRule ^/?channel/add/video/(.*)/(.*) add_video.php?urlkey=$1&gid=$2
RewriteRule ^/?channel/invite/members/(.*)/(.*) invite_members.php?urlkey=$1&gid=$2
RewriteRule ^/?channel/topic/(.*)/(.*)/(.*)/(.*) group_posts.php?urlkey=$1&gid=$2&tid=$3
I have been searching for a solution for the past few hours and haven't come across anything that works for me. Any help you could give would be much appreciated. 
|