Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Install to subdirectory
#7
k, here we go with this question.
I had a similar problem some time ago, for a website I've built using different CMS.
Rules may be not 100% semantically correct, but I solved my problem, and they work well with GS.

1. place your getsimple installation files in "GetSimple" directory
2. create .htaccess in root directory and use below rewrite rules changing address of your domain accordingly
Code:
#redirect non www address to www
RewriteCond %{HTTP_HOST} ^(www.yourdomain.tld)$
RewriteRule ^(.*)$ http://www.%1%{REQUEST_URI} [R=301,L]
#access from root location to nested directory content
RewriteCond %{REQUEST_URI} !/GetSmiple/
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ /GetSimple/$1
RewriteCond %{HTTP_HOST} ^(www.)?www.yourdomain.tld$
RewriteRule ^(/)?$ GetSimple/ [L]

3. Change your homepage url in gs admin panel to
http://www.yourdomain.tld

If you have some files you want to access from your root directory, or even nested, comment rules redirecting from non www to www address.
Then you can access your gs instance from http://www.yourdomain.tld
and other dirs/files using http://yourdomain.tld/file.ext

Quote:That is what I would want. I'm already using URL rewriting to get pretty URLs to pages like www.mydomain.com/pageslug and would like that maintained if possible.
I can't assure above path will work. If you add an exceptions to above rules, it should work. But if you have more than couple such links, and they stop working after you use my method, then you'd have to find another solution by changing rewrite rules, or your slug creation algorithm.


ps. still didn't find a 100% working way to change admin panel path using pure rewrite rules :\
Addons: blue business theme, Online Visitors, Notepad
Reply


Messages In This Thread
Install to subdirectory - by RobA - 2010-10-20, 10:56:37
RE: Install to subdirectory - by Psychosopher - 2013-05-28, 09:48:13
RE: Install to subdirectory - by shawn_a - 2013-05-28, 10:22:31
RE: Install to subdirectory - by Psychosopher - 2013-05-29, 04:00:12
Install to subdirectory - by ccagle8 - 2010-10-20, 12:08:15
Install to subdirectory - by yojoe - 2010-10-21, 00:40:15
Install to subdirectory - by RobA - 2010-10-21, 00:46:10
Install to subdirectory - by yojoe - 2010-10-21, 01:06:56
Install to subdirectory - by ccagle8 - 2010-10-21, 03:52:35
Install to subdirectory - by yojoe - 2010-10-22, 06:00:49
Install to subdirectory - by ccagle8 - 2010-10-22, 11:51:50
Install to subdirectory - by yojoe - 2010-10-22, 21:13:28
Install to subdirectory - by villeristi - 2012-05-06, 07:22:41



Users browsing this thread: 1 Guest(s)