Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
#1 2011-07-26 20:12:14
- Dimitri
- Member
- From: Johannesburg
- Registered: 2010-10-31
- Posts: 129
Change /textpattern to a path of your choice
Is there anyway I could change the path of site.dev/textpattern to anything you like such as /admin, /backend
Is it something I have to do in the .htaccess?
Thanx
<txp:way_too_cool />
Offline
Re: Change /textpattern to a path of your choice
For visual purposes or just as a shortcut?
The latter can be done by adding this into .htaccess:
Redirect permanent /admin/ http://www.example.com/textpattern/
Offline
#3 2011-07-26 20:18:09
- Dimitri
- Member
- From: Johannesburg
- Registered: 2010-10-31
- Posts: 129
Re: Change /textpattern to a path of your choice
Visual purposes….
Just come to think that, when presenting the site to a client, and say “K you have to login to the back by typing /textpattern”. You will be expecting some questions.
/backend is just simple enough
<txp:way_too_cool />
Offline
Re: Change /textpattern to a path of your choice
I used a soft link, from the command line:
ln -s /home/user/www/textpattern /home/user/www/login
But as I recall, any links to /textpattern will ask you to log in again, probably because cookies are path-based. Not really a big problem anyway…
This will show /login/ in place of /textpattern/ in all URLs throughout the admin panel, as long as you visit /login to log in. :-)
Last edited by maruchan (2011-07-26 20:24:05)
Offline
#5 2011-07-26 20:26:59
- Dimitri
- Member
- From: Johannesburg
- Registered: 2010-10-31
- Posts: 129
Re: Change /textpattern to a path of your choice
Thanx
<txp:way_too_cool />
Offline
Re: Change /textpattern to a path of your choice
In addition to what Marc said, you can also use relative paths with symbolic links. That way the links don’t need to be changed when moving the location, or installation from server to other, and makes working with version control system possible. I.e.
cd /path/to/dir/where/textpattern/dir/is
ln -s textpattern backend
Note that Windows OS versions prior to Vista don’t support symbolic links. Every other system (Mac OS, Unix like, Vista/7/Server 2008) are decently fine with them. If the links don’t work first, make sure to check Apache’s followsymlinks option, and turn it on if it’s off.
Offline
Re: Change /textpattern to a path of your choice
In addition to what Marc said, you can also use relative paths with symbolic links.
What a great idea. Thanks, Jukka.
Last edited by maruchan (2011-07-26 21:59:08)
Offline
Re: Change /textpattern to a path of your choice
Try using the multi-site setup. That way you can easily configure your textpattern directory to be only reachable from a different subdomain, e.g. only with SSL if you wish. This is what I did to my sites and even if you only have one site running it is very flexible to use.
Yoko for Textpattern – A free blog theme • Minimum Theme – If all you want to do is write.
Note: I am currently not actively using Textpattern, so I am not in the forums very often
Offline
#9 2011-07-27 07:54:48
- Dimitri
- Member
- From: Johannesburg
- Registered: 2010-10-31
- Posts: 129
Re: Change /textpattern to a path of your choice
Great thanx guys.
I am a person who cant make up my mind, if I want to change the softlink, I can do it but how can I remove the other ones, with this ln -r?
Before I do that, is there anyway I could have a look at the list of my softlinks from a command line
<txp:way_too_cool />
Offline
Re: Change /textpattern to a path of your choice
You can remove a symlink simply by using ‘rm’.
“ls -l” should show you where the symlinks point to.
Offline