Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#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

#2 2011-07-26 20:15:00

ruud
Developer Emeritus
From: a galaxy far far away
Registered: 2006-06-04
Posts: 5,068
Website

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

#4 2011-07-26 20:21:48

maruchan
Member
From: Ukiah, California
Registered: 2010-06-12
Posts: 596
Website

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

#6 2011-07-26 21:37:08

Gocom
Developer Emeritus
From: Helsinki, Finland
Registered: 2006-07-14
Posts: 4,533
Website

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

#7 2011-07-26 21:59:00

maruchan
Member
From: Ukiah, California
Registered: 2010-06-12
Posts: 596
Website

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

#8 2011-07-27 07:05:44

stephan
Plugin Author
From: Bochum, Germany
Registered: 2004-07-26
Posts: 196
Website

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 themeMinimum 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

#10 2011-07-27 08:29:12

ruud
Developer Emeritus
From: a galaxy far far away
Registered: 2006-06-04
Posts: 5,068
Website

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

Board footer

Powered by FluxBB