WordPress.org

Ready to get started?Download WordPress

Forums

Custom Rewriterule not working (1 post)

  1. r3actor
    Member
    Posted 3 years ago #

    I put a RewriteRule in htaccess and this does not work like that when you go to "file/123/1234.mp4" redirect to "http://123.otherdomain.com/file.php?f=1234".

    This is my htaccess

    Options +FollowSymLinks +Indexes
    RewriteEngine On
    RewriteRule ^/?file/(.*)/(.*)\.[mp4|m4v|ogv|webm|acc|mp3|m4a|ogg]{3,4}$ http://$1.otherdomain.com/file.php?f=$2 [R]
    # BEGIN WordPress
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    RewriteRule ^index\.php$ - [L]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]
    </IfModule>
    # END WordPress

    Thanks

Topic Closed

This topic has been closed to new replies.

About this Topic