Title: .htaccess problems. Please help me
Last modified: August 31, 2016

---

# .htaccess problems. Please help me

 *  [Versari](https://wordpress.org/support/users/versari/)
 * (@versari)
 * [10 years, 1 month ago](https://wordpress.org/support/topic/htaccess-problems-please-help-me/)
 * Hi everybody,
    right now I have a root WP website ([https://recensionidroni.com](https://recensionidroni.com))
   and a subfolder containing another installation of WP ([https://recensionidroni.com/mercatino](https://recensionidroni.com/mercatino)).
 * The problem is that every page under /mercatino/ redirect to a 404 page error
   from the root website. This is 100% an .htaccess problem, but I need help to 
   fix that because I’m trying to fix since two weeks without success…
 * .htacces of root website:
 *     ```
       # BEGIN WordPress
       <IfModule mod_rewrite.c>
       RewriteEngine On
       RewriteBase /
       RewriteCond %{HTTPS} !=on
       RewriteRule ^/?(.*) https://%recensionidroni.com/$1 [R=301]
       RewriteRule ^index\.php$ - [L]
       RewriteCond %{REQUEST_FILENAME} !-f
       RewriteCond %{REQUEST_FILENAME} !-d
       RewriteRule . /index.php [L]
       </IfModule>
       # END WordPress
   
       # BEGIN WPSuperCache
       <IfModule mod_rewrite.c>
       RewriteEngine On
       RewriteBase /
       #If you serve pages from behind a proxy you may want to change 'RewriteCond %{HTTPS} on' to something more sensible
       AddDefaultCharset UTF-8
       RewriteCond %{REQUEST_URI} !^.*[^/]$
       RewriteCond %{REQUEST_URI} !^.*//.*$
       RewriteCond %{REQUEST_METHOD} !POST
       RewriteCond %{QUERY_STRING} !.*=.*
       RewriteCond %{HTTP:Cookie} !^.*(comment_author_|wordpress_logged_in|wp-postpass_).*$
       RewriteCond %{HTTP:X-Wap-Profile} !^[a-z0-9\"]+ [NC]
       RewriteCond %{HTTP:Profile} !^[a-z0-9\"]+ [NC]
       RewriteCond %{HTTP_USER_AGENT} !^.*(2.0\ MMP|240x320|400X240|AvantGo|BlackBerry|Blazer|Cellphone|Danger|DoCoMo|Elaine/3.0|EudoraWeb|Googlebot-Mobile|hiptop|IEMobile|KYOCERA/WX310K|LG/U990|MIDP-2.|MMEF20|MOT-V|NetFront|Newt|Nintendo\ Wii|Nitro|Nokia|Opera\ Mini|Palm|PlayStation\ Portable|portalmmm|Proxinet|ProxiNet|SHARP-TQ-GX10|SHG-i900|Small|SonyEricsson|Symbian\ OS|SymbianOS|TS21i-10|UP.Browser|UP.Link|webOS|Windows\ CE|WinWAP|YahooSeeker/M1A1-R2D2|iPhone|iPod|Android|BlackBerry9530|LG-TU915\ Obigo|LGE\ VX|webOS|Nokia5800).* [NC]
       RewriteCond %{HTTP_user_agent} !^(w3c\ |w3c-|acs-|alav|alca|amoi|audi|avan|benq|bird|blac|blaz|brew|cell|cldc|cmd-|dang|doco|eric|hipt|htc_|inno|ipaq|ipod|jigs|kddi|keji|leno|lg-c|lg-d|lg-g|lge-|lg/u|maui|maxo|midp|mits|mmef|mobi|mot-|moto|mwbp|nec-|newt|noki|palm|pana|pant|phil|play|port|prox|qwap|sage|sams|sany|sch-|sec-|send|seri|sgh-|shar|sie-|siem|smal|smar|sony|sph-|symb|t-mo|teli|tim-|tosh|tsm-|upg1|upsi|vk-v|voda|wap-|wapa|wapi|wapp|wapr|webc|winw|winw|xda\ |xda-).* [NC]
       RewriteCond %{HTTP:Accept-Encoding} gzip
       RewriteCond %{HTTPS} on
       RewriteCond %{DOCUMENT_ROOT}/wp-content/cache/supercache/%{SERVER_NAME}/$1/index-https.html.gz -f
       RewriteRule ^(.*) "/wp-content/cache/supercache/%{SERVER_NAME}/$1/index-https.html.gz" [L]
   
       RewriteCond %{REQUEST_URI} !^.*[^/]$
       RewriteCond %{REQUEST_URI} !^.*//.*$
       RewriteCond %{REQUEST_METHOD} !POST
       RewriteCond %{QUERY_STRING} !.*=.*
       RewriteCond %{HTTP:Cookie} !^.*(comment_author_|wordpress_logged_in|wp-postpass_).*$
       RewriteCond %{HTTP:X-Wap-Profile} !^[a-z0-9\"]+ [NC]
       RewriteCond %{HTTP:Profile} !^[a-z0-9\"]+ [NC]
       RewriteCond %{HTTP_USER_AGENT} !^.*(2.0\ MMP|240x320|400X240|AvantGo|BlackBerry|Blazer|Cellphone|Danger|DoCoMo|Elaine/3.0|EudoraWeb|Googlebot-Mobile|hiptop|IEMobile|KYOCERA/WX310K|LG/U990|MIDP-2.|MMEF20|MOT-V|NetFront|Newt|Nintendo\ Wii|Nitro|Nokia|Opera\ Mini|Palm|PlayStation\ Portable|portalmmm|Proxinet|ProxiNet|SHARP-TQ-GX10|SHG-i900|Small|SonyEricsson|Symbian\ OS|SymbianOS|TS21i-10|UP.Browser|UP.Link|webOS|Windows\ CE|WinWAP|YahooSeeker/M1A1-R2D2|iPhone|iPod|Android|BlackBerry9530|LG-TU915\ Obigo|LGE\ VX|webOS|Nokia5800).* [NC]
       RewriteCond %{HTTP_user_agent} !^(w3c\ |w3c-|acs-|alav|alca|amoi|audi|avan|benq|bird|blac|blaz|brew|cell|cldc|cmd-|dang|doco|eric|hipt|htc_|inno|ipaq|ipod|jigs|kddi|keji|leno|lg-c|lg-d|lg-g|lge-|lg/u|maui|maxo|midp|mits|mmef|mobi|mot-|moto|mwbp|nec-|newt|noki|palm|pana|pant|phil|play|port|prox|qwap|sage|sams|sany|sch-|sec-|send|seri|sgh-|shar|sie-|siem|smal|smar|sony|sph-|symb|t-mo|teli|tim-|tosh|tsm-|upg1|upsi|vk-v|voda|wap-|wapa|wapi|wapp|wapr|webc|winw|winw|xda\ |xda-).* [NC]
       RewriteCond %{HTTP:Accept-Encoding} gzip
       RewriteCond %{HTTPS} !on
       RewriteCond %{DOCUMENT_ROOT}/wp-content/cache/supercache/%{SERVER_NAME}/$1/index.html.gz -f
       RewriteRule ^(.*) "/wp-content/cache/supercache/%{SERVER_NAME}/$1/index.html.gz" [L]
   
       RewriteCond %{REQUEST_URI} !^.*[^/]$
       RewriteCond %{REQUEST_URI} !^.*//.*$
       RewriteCond %{REQUEST_METHOD} !POST
       RewriteCond %{QUERY_STRING} !.*=.*
       RewriteCond %{HTTP:Cookie} !^.*(comment_author_|wordpress_logged_in|wp-postpass_).*$
       RewriteCond %{HTTP:X-Wap-Profile} !^[a-z0-9\"]+ [NC]
       RewriteCond %{HTTP:Profile} !^[a-z0-9\"]+ [NC]
       RewriteCond %{HTTP_USER_AGENT} !^.*(2.0\ MMP|240x320|400X240|AvantGo|BlackBerry|Blazer|Cellphone|Danger|DoCoMo|Elaine/3.0|EudoraWeb|Googlebot-Mobile|hiptop|IEMobile|KYOCERA/WX310K|LG/U990|MIDP-2.|MMEF20|MOT-V|NetFront|Newt|Nintendo\ Wii|Nitro|Nokia|Opera\ Mini|Palm|PlayStation\ Portable|portalmmm|Proxinet|ProxiNet|SHARP-TQ-GX10|SHG-i900|Small|SonyEricsson|Symbian\ OS|SymbianOS|TS21i-10|UP.Browser|UP.Link|webOS|Windows\ CE|WinWAP|YahooSeeker/M1A1-R2D2|iPhone|iPod|Android|BlackBerry9530|LG-TU915\ Obigo|LGE\ VX|webOS|Nokia5800).* [NC]
       RewriteCond %{HTTP_user_agent} !^(w3c\ |w3c-|acs-|alav|alca|amoi|audi|avan|benq|bird|blac|blaz|brew|cell|cldc|cmd-|dang|doco|eric|hipt|htc_|inno|ipaq|ipod|jigs|kddi|keji|leno|lg-c|lg-d|lg-g|lge-|lg/u|maui|maxo|midp|mits|mmef|mobi|mot-|moto|mwbp|nec-|newt|noki|palm|pana|pant|phil|play|port|prox|qwap|sage|sams|sany|sch-|sec-|send|seri|sgh-|shar|sie-|siem|smal|smar|sony|sph-|symb|t-mo|teli|tim-|tosh|tsm-|upg1|upsi|vk-v|voda|wap-|wapa|wapi|wapp|wapr|webc|winw|winw|xda\ |xda-).* [NC]
       RewriteCond %{HTTPS} on
       RewriteCond %{DOCUMENT_ROOT}/wp-content/cache/supercache/%{SERVER_NAME}/$1/index-https.html -f
       RewriteRule ^(.*) "/wp-content/cache/supercache/%{SERVER_NAME}/$1/index-https.html" [L]
   
       RewriteCond %{REQUEST_URI} !^.*[^/]$
       RewriteCond %{REQUEST_URI} !^.*//.*$
       RewriteCond %{REQUEST_METHOD} !POST
       RewriteCond %{QUERY_STRING} !.*=.*
       RewriteCond %{HTTP:Cookie} !^.*(comment_author_|wordpress_logged_in|wp-postpass_).*$
       RewriteCond %{HTTP:X-Wap-Profile} !^[a-z0-9\"]+ [NC]
       RewriteCond %{HTTP:Profile} !^[a-z0-9\"]+ [NC]
       RewriteCond %{HTTP_USER_AGENT} !^.*(2.0\ MMP|240x320|400X240|AvantGo|BlackBerry|Blazer|Cellphone|Danger|DoCoMo|Elaine/3.0|EudoraWeb|Googlebot-Mobile|hiptop|IEMobile|KYOCERA/WX310K|LG/U990|MIDP-2.|MMEF20|MOT-V|NetFront|Newt|Nintendo\ Wii|Nitro|Nokia|Opera\ Mini|Palm|PlayStation\ Portable|portalmmm|Proxinet|ProxiNet|SHARP-TQ-GX10|SHG-i900|Small|SonyEricsson|Symbian\ OS|SymbianOS|TS21i-10|UP.Browser|UP.Link|webOS|Windows\ CE|WinWAP|YahooSeeker/M1A1-R2D2|iPhone|iPod|Android|BlackBerry9530|LG-TU915\ Obigo|LGE\ VX|webOS|Nokia5800).* [NC]
       RewriteCond %{HTTP_user_agent} !^(w3c\ |w3c-|acs-|alav|alca|amoi|audi|avan|benq|bird|blac|blaz|brew|cell|cldc|cmd-|dang|doco|eric|hipt|htc_|inno|ipaq|ipod|jigs|kddi|keji|leno|lg-c|lg-d|lg-g|lge-|lg/u|maui|maxo|midp|mits|mmef|mobi|mot-|moto|mwbp|nec-|newt|noki|palm|pana|pant|phil|play|port|prox|qwap|sage|sams|sany|sch-|sec-|send|seri|sgh-|shar|sie-|siem|smal|smar|sony|sph-|symb|t-mo|teli|tim-|tosh|tsm-|upg1|upsi|vk-v|voda|wap-|wapa|wapi|wapp|wapr|webc|winw|winw|xda\ |xda-).* [NC]
       RewriteCond %{HTTPS} !on
       RewriteCond %{DOCUMENT_ROOT}/wp-content/cache/supercache/%{SERVER_NAME}/$1/index.html -f
       RewriteRule ^(.*) "/wp-content/cache/supercache/%{SERVER_NAME}/$1/index.html" [L]
       </IfModule>
   
       # END WPSuperCache
   
       ## EXPIRES CACHING ##
       <IfModule mod_expires.c>
       ExpiresActive On
       ExpiresByType image/jpg "access plus 1 year"
       ExpiresByType image/jpeg "access plus 1 year"
       ExpiresByType image/gif "access plus 1 year"
       ExpiresByType image/png "access plus 1 year"
       ExpiresDefault "access plus 2 days"
       </IfModule>
       ## EXPIRES CACHING ##
       ```
   
 * .htaccess of /mercatino/:
 *     ```
       # BEGIN WPSuperCache
       # END WPSuperCache
       # BEGIN WordPress
        RewriteCond %{REQUEST_FILENAME} !-f
        RewriteCond %{REQUEST_FILENAME} !-d
        RewriteRule . /mercatino/index.php [L]
       # END WordPress
       ```
   
 * I already tried to reset htaccess file of /mercatino/ but it redirects to 404
   error page from root website anyway..
 * Thanks in advance!
    Ps: my website must stay **https:// non-www**

Viewing 6 replies - 1 through 6 (of 6 total)

 *  Thread Starter [Versari](https://wordpress.org/support/users/versari/)
 * (@versari)
 * [10 years, 1 month ago](https://wordpress.org/support/topic/htaccess-problems-please-help-me/#post-7229207)
 * Ps: this happens only when I set Permalinks as /%postname%/
 * I already tried to use simple permalinks and it works.
 *  Thread Starter [Versari](https://wordpress.org/support/users/versari/)
 * (@versari)
 * [10 years, 1 month ago](https://wordpress.org/support/topic/htaccess-problems-please-help-me/#post-7229219)
 * I tried to deactivate all plugins, but it didn’t help.
 *  Thread Starter [Versari](https://wordpress.org/support/users/versari/)
 * (@versari)
 * [10 years, 1 month ago](https://wordpress.org/support/topic/htaccess-problems-please-help-me/#post-7229285)
 * No one can help me?
 *  Thread Starter [Versari](https://wordpress.org/support/users/versari/)
 * (@versari)
 * [10 years, 1 month ago](https://wordpress.org/support/topic/htaccess-problems-please-help-me/#post-7229386)
 * Still need help.
 *  Thread Starter [Versari](https://wordpress.org/support/users/versari/)
 * (@versari)
 * [10 years, 1 month ago](https://wordpress.org/support/topic/htaccess-problems-please-help-me/#post-7229395)
 * Still need help
 *  Thread Starter [Versari](https://wordpress.org/support/users/versari/)
 * (@versari)
 * [10 years, 1 month ago](https://wordpress.org/support/topic/htaccess-problems-please-help-me/#post-7229418)
 * Waiting for help

Viewing 6 replies - 1 through 6 (of 6 total)

The topic ‘.htaccess problems. Please help me’ is closed to new replies.

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 6 replies
 * 1 participant
 * Last reply from: [Versari](https://wordpress.org/support/users/versari/)
 * Last activity: [10 years, 1 month ago](https://wordpress.org/support/topic/htaccess-problems-please-help-me/#post-7229418)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
