im attempting to perform a rewite but for whatever reason it is not spinning properly. my structure is suppose to appear such as this http://mysite.com/tv-show/showname/episode rather its doing http://mysite.com/tv-show/episode

this really is my code

<IfModule mod_rewrite.c>
RewriteEngine On
RewriteRule ^tv-shows/(.*?)/(.*?)/ /index.php?name=$2 [NC]
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>

It appears fine, can there be anything im missing?

do this:

RewriteEngine On
RewriteRule ^tv-show(s?)/([a-z0-9\-_]+)/([a-z0-9\-_]+)/? /index.php?name=$3 [NC,L]
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]