• I have been developing a website in parallel on my primary site (pariscreative.com) and I went to switch the new site to live and ran into issues.

    Step 1. I changed in general settings on the new site to remove the subdirectories.

    Step 2. I changed my htaccess file to include the rewritecond and rewrite rule

    # BEGIN WordPress
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteCond %{REQUEST_URI} /(thumb-temp|thumb-cache|images|cache|media|logs|tmp|temp)/.*\.(php|pl|py|jsp|asp|sh|cgi)$
    RewriteRule (.*) /index.php [R=301,L]
    RewriteRule ^(htaccess\.txt|wp-config-sample\.php?|wp-config\.php?|php\.ini)$ - [F]
    </IfModule>
    
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteCond %{HTTP_HOST} ^(www.)?pariscreative.com$
    RewriteRule ^(/)?$ _PCv3 [L]
    RewriteBase /
    RewriteRule ^index\.php$ - [L]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]
    </IfModule>
    
    # END WordPress

    Step 3. I changed index.php in root to reflect the new directoy
    require( dirname( __FILE__ ) . '/_PCv3/wp-blog-header.php' );

    However when I changed this, all the site imagery was broken and I could not access wp-admin. I’ve since switched the old files back, but since I completed step 1 I can’t get into my wp-admin on the new site.

  • The topic ‘Tried redirect of site to new subdir. Issues.’ is closed to new replies.