Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

Website and Server Administration Forum


You are currently viewing our Website and Server Administration Forum as a guest. Please register to participate.
Login



Reply
mod_rewrite exception
Old 08-12-2009, 09:03 PM mod_rewrite exception
zkiller's Avatar
Novice Talker

Posts: 12
Location: Warner Robins, GA
Trades: 0
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.
zkiller is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 08-13-2009, 05:12 AM Re: mod_rewrite exception
zkiller's Avatar
Novice Talker

Posts: 12
Location: Warner Robins, GA
Trades: 0
Fixed!

The following write up was a immense help. If you are looking to do anything with mod_rewrite, I suggest you it a read.

http://datakoncepts.com/seo
zkiller is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to mod_rewrite exception
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.10193 seconds with 12 queries