• i have a page in wordpress called “video”. its page id is 6, and its slug is “video”

    in my theme ive set it up to show content based on GET variables

    here is the URL rewrite im trying to set up:

    heres the original URL with the GET variables inside:

    mysite.com/video/?video_id=102230&video_title=FC+Emmen+v+AGOVV+Apeldoorn&video_src=MTAyMjMw

    heres the URL i want it rewritten to so it can be indexed:

    mysite.com/video/102230/MTAyMjMw/FC+Emmen+v+AGOVV+Apeldoorn

    heres my htaccess file that is not working:

    # BEGIN WordPress
    <ifmodule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]
    RewriteRule ^video/(.*)/(.*)/(.*)$ ?page_id=6&7video_id=$1&video_src=$2&video_title=$3 [NC]
    </ifmodule>
    # END WordPress

    what happens is, when i try and visit mysite.com/video/102230/MTAyMjMw/FC+Emmen+v+AGOVV+Apeldoorn, it simply automatically goes to mysite.com/video and removes everything after /video

    edit – now it is not removing everything after /video, but its telling me “Nothing found for Video 102230 MTAyMjMw FC+Emmen+v+AGOVV+Apeldoorn”

Viewing 1 replies (of 1 total)
  • The rewrite rules are processed in order. You need to place your rewrite rule before the “RewriteRule . /index.php [L]” line.

    Also, the [L] flag means it’s the “last” rule, so it won’t process any more rules if it matches.

    Hope that helps.

    Joe

Viewing 1 replies (of 1 total)
  • The topic ‘help with custom htaccess rewrite rule for page’ is closed to new replies.