mod_rewrite rule to redirect SquareSpace URLs to WordPress URLs (2 posts)

  1. monicashaw
    Posted 4 years ago #

    I just moved my blog from a hosted page on SquareSpace to a WordPress install on my web host. The import was easy, but I'm now facing the thorny problem of permalinks.

    In my case, Squarespace's permalink structure is as follows:


    I want to redirect these to


    Can someone help me with a mod_rewrite rule to do this?

    Thank in advance,


  2. trevorcooperphotography
    Posted 3 years ago #

    Modify the .htaccess in your web root adding the line...

    RewriteRule ^(.+).html$ $1 [L,NC,R=301]

    ...so that the file looks something like the following...

    # BEGIN WordPress
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    RewriteRule ^(.+).html$ $1 [L,NC,R=301]
    RewriteRule ^index\.php$ - [L]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]
    # END WordPress

    You may have other lines as well. Mine is pretty vanilla but this is working for me.

    Here is a sample URL... San Elijo Lagoon Wildlife | Trevor Cooper Photography

    Hope it works for you as well.


Topic Closed

This topic has been closed to new replies.

About this Topic