Support » Fixing WordPress » Rewrite dynamic url to permalink

Viewing 2 replies - 1 through 2 (of 2 total)
  • I’ve tried this way :

    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteCond %{QUERY_STRING} .
    RewriteRule ^newsletter-([.]+)$ http://www.datingwatch.org/newsletter-$1? [R=301,L]
    </IfModule>
    
    # BEGIN WordPress
    <IfModule mod_rewrite.c>
    
    RewriteEngine On
    RewriteBase /
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]
    </IfModule>
    
    # END WordPress

    Here it changes nothing: 404 error… but no 500 error 🙂

    Finally, I found the solution :

    <IfModule mod_rewrite.c>
    
    RewriteEngine On
    RewriteBase /
    RewriteCond %{QUERY_STRING} .
    RewriteRule ^newsletter-(.+)$ http://www.datingwatch.org/newsletter-$1? [R=301,L]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]
    </IfModule>

    Hope this could help

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Rewrite dynamic url to permalink’ is closed to new replies.