Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
[Solved] How do I change http://example.com/textpattern to /admin?
Hello,
I just need a small change to be done, all I want is to access admin panel by typing /admin in URL instead of textpatttern. This is just for added security & hiding the backend system from unwanted attention.
Right now I achieve this by creating a dedicated page with front authentication, it works pretty well most times but it’s not that useful when clean URLs are not supported by the server.
I’d really like to know how you guys tackle this issue.
Thanks for your time.
Last edited by vineonardo (2013-03-06 09:41:37)
Offline
Re: [Solved] How do I change http://example.com/textpattern to /admin?
You could use symbolic links:
$ cd /path/to/dir/where/textpattern/dir/is
$ ln -s textpattern admin
The above commands will create a relative symbolic link from ‘admin’ to ‘textpattern’.
After which you can additionally redirect requests from /textpattern to /admin with some redirect rule of your choice. Textpattern will still create links that point to the old location, for instance password reset links. One way of redirecting the requests is by using a small Mod_Rewrite rule placed in the /textpattern directory:
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} /textpattern/
RewriteRule ^(.*) /admin/$1 [R]
</ifModule>
Other options to moving admin location include using the multi-site setup or playing with rewrite modules among others. There are existing topics about this stuff around this forum.
Offline
Offline