Have I read the related troubleshooter articles above before posting (which pages?)? Yes
Have I searched the tickets before posting? Yes
Have I read the documentation before posting (which pages?)? Yes, but not this specific time.
Joomla! version: (unknown) 2.5.11
PHP version: (unknown) 5.3.24
MySQL version: (unknown) 5.1.68-cll
Host: (optional, but it helps us help you) CPanel
Admin Tools version: (unknown) 2.5.5 Pro
Description of my issue:
I have a test site in a subdirectory of 'x62, so the url would be http://mysite.com/x62.
I wanted "http://www.mysite.com/x62/" to go to this also (no 'www').
When I generate an .htaccess file for "www to non-www" it redirects to the main site of http://www.mysite.com and NOT the http://www.mysite.com/x62/
I've also attached a screen shot of the System Settings section of the .htaccess maker, if that is needed.
I believe this is the relevant portion of the .htaccess file. I've changed the actual site name.
--------------
##### RewriteEngine enabled - BEGIN
RewriteEngine On
##### RewriteEngine enabled - END
##### RewriteBase set - BEGIN
RewriteBase /x62
##### RewriteBase set - END
##### File execution order -- BEGIN
DirectoryIndex index.php index.html
##### File execution order -- END
##### No directory listings -- BEGIN
IndexIgnore *
Options All -Indexes
##### No directory listings -- END
##### Redirect index.php to / -- BEGIN
RewriteCond %{THE_REQUEST} !^POST
RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /index\.php\ HTTP/
RewriteCond %{SERVER_PORT}>s ^(443>(s)|[0-9]+>s)$
RewriteRule ^index\.php$ http%2://mysite.com/x62/ [R,L]
##### Redirect index.php to / -- END
##### Redirect www to non-www -- BEGIN
RewriteCond %{HTTP_HOST} ^www\.(.+)$ [NC]
RewriteRule ^(.*)$ http://%1/$1 [R,L]
##### Redirect www to non-www -- END
##### Rewrite rules to block out some common exploits -- BEGIN
RewriteCond %{QUERY_STRING} proc/self/environ [OR]
RewriteCond %{QUERY_STRING} mosConfig_[a-zA-Z_]{1,21}(=|\%3D) [OR]
RewriteCond %{QUERY_STRING} base64_(en|de)code\(.*\) [OR]
RewriteCond %{QUERY_STRING} (<|%3C).*script.*(>|%3E) [NC,OR]
RewriteCond %{QUERY_STRING} GLOBALS(=|\[|\[0-9A-Z]{0,2}) [OR]
RewriteCond %{QUERY_STRING} _REQUEST(=|\[|\[0-9A-Z]{0,2})
RewriteRule .* index.php [F]
##### Rewrite rules to block out some common exploits -- END
##### File injection protection -- BEGIN
RewriteCond %{REQUEST_METHOD} GET
RewriteCond %{QUERY_STRING} [a-zA-Z0-9_]=http:// [OR]
RewriteCond %{QUERY_STRING} [a-zA-Z0-9_]=(\.\.//?)+ [OR]
RewriteCond %{QUERY_STRING} [a-zA-Z0-9_]=/([a-z0-9_.]//?)+ [NC]
RewriteRule .* - [F]
##### File injection protection -- END
##### Advanced server protection rules exceptions -- BEGIN
RewriteRule ^administrator\/components\/com_akeeba\/restore\.php$ - [L]
RewriteRule ^administrator\/components\/com_admintools\/restore\.php$ - [L]
RewriteRule ^administrator\/components\/com_joomlaupdate\/restore\.php$ - [L]
RewriteRule ^templates\/your_template_name_here/ - [L]
##### Advanced server protection rules exceptions -- END