Viewing 4 replies - 1 through 4 (of 4 total)
  • Thread Starter jbusci

    (@jbusci)

    i know this is a tough problem, right?

    One thing I probably should have mentioned.

    I tried to create multiple index.html files under the categories. But quickly realized that wordpress won’t allow me to have pretty permalinks using the same post name even if they are in the same category.

    This might be an advanced topic.

    Thread Starter jbusci

    (@jbusci)

    So wordpress was indeed functioning as it should. apparently my RewriteCond was too verbose and wordpress rescued me by gracefully serving up the closest match it could find for the index.html I was calling.

    Here is the working rewrite rule. of course substitute https://www.domain.com

    RewriteCond %{THE_REQUEST} ^([^/]+/)*index\.html\ HTTP/
    RewriteCond %{THE_REQUEST} ^.*/index\.html
    RewriteRule ^(([^/]+/)*)index.html$ https://www.domain.com/$1 [R=301,L]
    Thread Starter jbusci

    (@jbusci)

    resolved

    Thread Starter jbusci

    (@jbusci)

    lol ooops

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘redirect /oldStaticDir/index.html to /newWPDirectory’ is closed to new replies.