Title: WordPress running from a folder
Last modified: August 24, 2016

---

# WordPress running from a folder

 *  [suge1w](https://wordpress.org/support/users/suge1w/)
 * (@suge1w)
 * [11 years, 1 month ago](https://wordpress.org/support/topic/wordpress-running-from-a-folder/)
 * Hello guys,
 * I hope this is in the correct forum.
 * I’ve been a long-time browser of these forums but haven’t felt the need to create
   a thread yet. I try and resolve my own issues using other topics and replies 
   then working from there to find a solution.
 * However, this problem I have has got me a bit stumped so I’m making this topic.
 * I have a VPS which I run myself. On my domain I run two sites; both from folders
   within the root. (example.com/site1 etc)
 * One of these sites is based on Joomla (back when Joomla was my favourite and 
   I hadn’t given much thought to using WP) and the other WP. Now, the Joomla site
   is well established with reasonable traffic. The WP site had initial teething
   problems when changing permalinks so I had to copy & paste the htacess file from
   Joomla. This seemed to do the trick but I soon noticed a dip in traffic on the
   Joomla site.
 * I haven’t put my finger on why the dip occurred but I’m sure it has something
   to do with the WP install.
 * Here is the htaccess file that exists in both folders
 *     ```
       <IfModule mod_headers.c>
       Header unset ETag
       Header unset Last-Modified
       </IfModule>
       FileETag None
       <FilesMatch "\.(ico|gz|JPG|jpg|jpeg|png|gif|js|css|swf)$">
       Header unset Cache-control
       Header set Expires "access plus 1 month"
       </FilesMatch>
   
       # Patched on: %2013-%05-%20 %17:%May:%10
       # Auto-patched by jbetolo <FilesMatch "\.(gif|jpg|jpeg|png|swf|pdf|css|js|html|ico?|xml|txt)$"> 	FileETag none </FilesMatch> <IfModule mod_expires.c>         ExpiresActive On         ExpiresDefault A600         ExpiresByType image/x-icon A5184000         ExpiresByType application/x-javascript A5184000         ExpiresByType application/javascript A5184000         ExpiresByType text/css A5184000         ExpiresByType text/javascript A5184000         ExpiresByType image/gif A5184000         ExpiresByType image/png A5184000         ExpiresByType image/jpeg A5184000         ExpiresByType text/plain A86400         ExpiresByType application/x-shockwave-flash A5184000         ExpiresByType video/x-flv A5184000         ExpiresByType application/pdf A5184000         ExpiresByType text/html A600 </IfModule>
       ##
       # @package		Joomla
       # @copyright	Copyright (C) 2005 - 2012 Open Source Matters. All rights reserved.
       # @license		GNU General Public License version 2 or later; see LICENSE.txt
       ##
   
       ##
       # READ THIS COMPLETELY IF YOU CHOOSE TO USE THIS FILE!
       #
       # The line just below this section: 'Options +FollowSymLinks' may cause problems
       # with some server configurations.  It is required for use of mod_rewrite, but may already
       # be set by your server administrator in a way that dissallows changing it in
       # your .htaccess file.  If using it causes your server to error out, comment it out (add # to
       # beginning of line), reload your site in your browser and test your sef url's.  If they work,
       # it has been set by your server administrator and you do not need it set here.
       ##
   
       ## Can be commented out if causes errors, see notes above.
       # For security reasons, Option followsymlinks cannot be overridden.
       #Options +FollowSymLinks
       Options +SymLinksIfOwnerMatch
   
       ## Mod_rewrite in use.
   
       RewriteEngine On
   
       ## Begin - Rewrite rules to block out some common exploits.
       # If you experience problems on your site block out the operations listed below
       # This attempts to block the most common type of exploit <code>attempts</code> to Joomla!
       #
       # Block out any script trying to base64_encode data within the URL.
       RewriteCond %{QUERY_STRING} base64_encode[^(]*\([^)]*\) [OR]
       # Block out any script that includes a <script> tag in URL.
       RewriteCond %{QUERY_STRING} (<|%3C)([^s]*s)+cript.*(>|%3E) [NC,OR]
       # Block out any script trying to set a PHP GLOBALS variable via URL.
       RewriteCond %{QUERY_STRING} GLOBALS(=|\[|\%[0-9A-Z]{0,2}) [OR]
       # Block out any script trying to modify a _REQUEST variable via URL.
       RewriteCond %{QUERY_STRING} _REQUEST(=|\[|\%[0-9A-Z]{0,2})
       # Return 403 Forbidden header and show the content of the root homepage
       RewriteRule .* index.php [F]
       #
       ## End - Rewrite rules to block out some common exploits.
   
       ## Begin - Custom redirects
       #
       # If you need to redirect some pages, or set a canonical non-www to
       # www redirect (or vice versa), place that code here. Ensure those
       # redirects use the correct RewriteRule syntax and the [R=301,L] flags.
       #
       ## End - Custom redirects
   
       ##
       # Uncomment following line if your webserver's URL
       # is not directly related to physical file paths.
       # Update Your Joomla! Directory (just / for root).
       ##
   
       # RewriteBase /
   
       ## Begin - Joomla! core SEF Section.
       #
       RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
       #
       # If the requested path and file is not /index.php and the request
       # has not already been internally rewritten to the index.php script
       RewriteCond %{REQUEST_URI} !^/index\.php
       # and the request is for something within the component folder,
       # or for the site root, or for an extensionless URL, or the
       # requested URL ends with one of the listed extensions
       RewriteCond %{REQUEST_URI} /component/|(/[^.]*|\.(php|html?|feed|pdf|vcf|raw))$ [NC]
       # and the requested path and file doesn't directly match a physical file
       RewriteCond %{REQUEST_FILENAME} !-f
       # and the requested path and file doesn't directly match a physical folder
       RewriteCond %{REQUEST_FILENAME} !-d
       # internally rewrite the request to the index.php script
       RewriteRule .* index.php [L]
       #
       ## End - Joomla! core SEF Section.
       ```
   
 * I wouldn’t know if this is a SEO black hole with running 2 sites from folders
   so any advice/feedback I receive would be very much welcome. Thanks for reading.

The topic ‘WordPress running from a folder’ is closed to new replies.

## Tags

 * [folder](https://wordpress.org/support/topic-tag/folder/)
 * [htaccess](https://wordpress.org/support/topic-tag/htaccess/)
 * [Joomla](https://wordpress.org/support/topic-tag/joomla/)
 * [root](https://wordpress.org/support/topic-tag/root/)

 * In: [Networking WordPress](https://wordpress.org/support/forum/multisite/)
 * 0 replies
 * 1 participant
 * Last reply from: [suge1w](https://wordpress.org/support/users/suge1w/)
 * Last activity: [11 years, 1 month ago](https://wordpress.org/support/topic/wordpress-running-from-a-folder/)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
