WordPress.org

Ready to get started?Download WordPress

Forums

how do I use htaccess to redirect old incoming links? (2 posts)

  1. ghmercado
    Member
    Posted 7 years ago #

    hi i have a new permalink structure since a server move. `What used to be:

    http://kikay.exchange.ph/2006/10/30/kikay-cams/

    became:

    http://kikay.exchange.ph/index.php/2006/10/30/kikay-cams/`

    I'd like to stick to the new one, but I'm sure there are sites out there with links into my site that are still with the old one.

    How may I redirect these to the new permalink structure using htaccess? Currently, my htaccess reads like this:

    # BEGIN WordPress
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    RewriteCond %{REQUEST_URI} ^/cgi-bin(/.*)?$ [OR]
    RewriteCond %{SCRIPT_FILENAME} -f [OR]
    RewriteCond %{SCRIPT_FILENAME} -d
    RewriteRule .* - [PT,L]
    
    RewriteRule ^([a-zA-Z0-9-]+)/?$ /index.php [L]
    RewriteRule ^([a-zA-Z0-9-]+)/([a-zA-Z0-9-]+)/?$ /index.php [L]
    </IfModule>
    
    # END WordPress

    thanks so much

  2. kristarella
    Member
    Posted 7 years ago #

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags