Code: Select all
www.site.com/cmsms2015/
Code: Select all
www.site.com/
Thanks for any tips
Code: Select all
www.site.com/cmsms2015/
Code: Select all
www.site.com/
Code: Select all
#
RewriteEngine On
RewriteBase /www
# redirect to www-directory and hide the /www in the URL
RewriteCond %{SCRIPT_FILENAME} !-f
RewriteRule !^www(/?|/.+)$ /www%{REQUEST_URI} [L]
Code: Select all
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} !(.*)cmsms2015
RewriteRule ^(.*)$ cmsms2015/$1 [QSA]
Code: Select all
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} !(.*)cmsms2015
RewriteRule ^(.*)$ cmsms2015/index.php?page=$1 [QSA,L]
Code: Select all
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} !(.*)cmsms2015
RewriteCond %{REQUEST_URI} !^/admin
RewriteRule ^(.*)$ cmsms2015/index.php?page=$1 [QSA,L]
Code: Select all
RewriteEngine On
# force www IN URL
RewriteCond %{HTTP_HOST} !^www\.mysite\.com [NC]
RewriteRule ^(.*)$ http://www.mysite.com/$1 [R=301,L]
# END force www IN URL
RewriteCond %{SCRIPT_FILENAME} !-f
RewriteRule !^cms(/?|/.+)$ /cms%{REQUEST_URI} [L]
Code: Select all
$config['root_url'] = 'http://www.mysite.com';
$config['root_path'] = '/home/mysite/public_html/cms';
You wouldn't need to do anything to the database if you are just moving the website up one directory level. Personally I move the files, doesn't take long and when I look at the site months/years later (when I have forgotten all about it) it's obvious what is going on without having to dig in to htaccess files etc.psy wrote:Then, forget all the hassle of exporting/importing databases