• I’m migrating from typepad to wordpress, and I’m using Adam Stiles “painless migration”. Everything works great except the mod-rewrite rules. For some reason wordpress ignores entries I enter myself (It’s the very first re-write rule):

    # -FrontPage-
    RewriteRule ^mysite/([0-9]{4})/([0-9]{1,2})/(.*).html$ /index.php?year=$1&monthnum=$2&name=$3 [QSA,L]

    IndexIgnore .htaccess */.??* *~ *# */HEADER* */README* */_vti*

    <Limit GET POST>
    order deny,allow
    deny from all
    allow from all
    </Limit>
    <Limit PUT DELETE>
    order deny,allow
    deny from all
    </Limit>
    AuthName https://www.mysite.com
    AuthUserFile /home/csbaff/public_html/_vti_pvt/service.pwd
    AuthGroupFile /home/csbaff/public_html/_vti_pvt/service.grp

    # BEGIN WordPress
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]
    </IfModule>

    # END WordPress

    RewriteEngine On

    Any help would be greatly appreciated!

Viewing 4 replies - 1 through 4 (of 4 total)
  • Try moving the RewriteEngine On at the end of your file to infront of your rule, so it’s
    # -FrontPage-
    RewriteEngine On
    RewriteRule ^mysite/([0-9]{4})/([0-9]{1,2})/(.*).html$

    Thread Starter csbaff

    (@csbaff)

    Moved it up to the top, still doesn’t work.

    Your code looks good to me except I don’t think (2) RewriteEngine On statements will work. Try leaving the one in WP section in and taking the other out.

    Permalinks & MS Frontpage –

    There have been a number of threads on this issue, and I’ve updated the documentation in the codex to reflect the following information.

    Normally, on a Unix server with the Microsoft Frontpage Server extensions installed wordpress works just fine and you are able to
    edit and publish pages – UNTIL – you make a change to the permalinks (for example to the date based kind that I like /2005/04/etc).
    I often suggest that type of URI to folks asking about permalinks etc, as that is the method recommended by the w3c (see https://www.w3.org/Provider/Style/URI ).

    Now, the problem is that MS Frontpage uses the .htaccess file (which the wordpress mod_rewrite rules must go into) for it’s “publishing” and
    “web authoring” configuration. As soon as the wordpress mod_rewrite code is added to the file, two things happen – the permalinks don’t work, and the MS Frontpage Server extensions become corrupted.

    I have tried countless ways to get around this, including trying to use rewrite rules that “ignore” the %{HTTP_USERAGENT)% used by Frontpage, to using a second AccessFilename .wpaccess to the httpd.conf file, and a host of other things, and nothing worked so that a person would be able
    to both use MS Frontpage to manage the website and use the permalinks for wordpress at the same time.

    Until Now.

    The solution is acctually quite simple, and I kind of figured it out by accident.

    If you are using or wish to use MS Frontpage along with wordpress you’ll need to take the following simple steps on your server (or have your hosting company do it for you).

    MS Frontpage creates the following directory
    _vti_bin

    Nested within that it creates both _vti_adm and _vti_aut

    In addition to in your website (or wordpress) root folder in all of those directories you will find a .htaccess file.

    In all three of these directories AND in your root directory, at the top of ALL of the .htaccess files you simply need to add one line –
    Options +FollowSymlinks

    Add that to the top of each file (which may have something like Options None in there already).

    Then close and save the files and you’re done.
    Now everyhting works perfectly, including MS Frontpage, AND the permalinks of your choosing.

    On a personal note, I prefer to use Frontpage to manage/maintain sites, I’ve been using it since around ’96, and by now, since I do most work on UNIX servers anyway I have it configured to use external editors for just about everything, including Zend Studio for php files, Bradbury TopStyle for stylesheets, Adobe ImageReady/Photoshop for images, etc. I’m more or less just using Frontpage as a convenient way to manage the site and access everything, etc. Then when I hit the “save” button in any of the other applications, they have Frontpage save my changes directly to the server, with no need to be FTP’ing files around, etc. It does help to get lots accomplished very quickly, and I was pretty bummed for the past year or so with the permalink frustration, since I was either needing to not use permalinks or not use Frontpage, or keep re-installing the FP extensions. At one point I found a way to make a .htaccess for my “running” site, but then change it to a FP .htaccess when I was doing any work (permalinks of course didn’t work), either way it was a real pain.

    This should work with most versions of FP and most of the unix versions of the extensions in use today.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘My Mod Rewrite isn’t working’ is closed to new replies.