• Hi everyone,

    I have the following .HTACCESS which is used for my PHP files. However I want to keep all the following information (see second .HTACCESS) but change the address of my wordpress files from https://www.mysite.com/wordpress to https://www.mysite.com/

    If I follow the tutorial and add the following to my .HTACCESS it works…

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

    … However none of my other rewrites work… any ideas? My original .HTACCESS file is below;

    RewriteEngine on
    
    # defeat robot exploits
    RewriteCond %{QUERY_STRING} https:// [OR]
    RewriteCond %{REQUEST_URI} https://
    RewriteRule ^(.*)$ - [F]
    
    rewritecond %{http_host} ^mysite.com [nc]
    rewriterule ^(.*)$ https://www.mysite.com/$1 [r=301,nc]
    
    # disable directory browsing
    Options All -Indexes
    
    RewriteRule ^furniture(.*).html$ furnituredisplay.php?page=furniture/furniture$1&type=htm [L,NC]
    RewriteRule ^android(.*).html$ androiddisplay.php?page=android/android$1&type=htm [L,NC]
    #php_flag register_globals on
    #php_flag display_errors off

    cheers,
    Andrew

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘.HTACCESS to remove directory in address but keep existing PHP re-writes?’ is closed to new replies.