Is this possible to change path to admin page in Joomla 3?
The standard is domain.xxx/administrator but I would like to have something like domain.xxx/backoffice.
It can be done, but it is not recommended.
You will have many problems to make updates, etc.
For security propuse, I use the plugin Admin Exile, which requires adding a value after the url and if not present, jump directly to the homepage of the site.
Admin Exile
As the other guy told, it can be done but it's not recommended cause of updates.
Another security method which doesn't need any plugin is protecting by .htaccess
( https://www.addedbytes.com/blog/code/password-protect-a-directory-with-htaccess/ )
Related
As soon as I unzipped and configured the PSK, I tried to add an admin.html page next to index.html from where I'd like to manage my application. However, when I try to reach it via localhost:3000/admin, I get redirected to localhost:3000/admin#!/admin where the original application, the one in index.html shows up, I think because of routing.
I tried removing the hashbang option from page.js, tried changing the / route to /home, all to no avail. The admin.html page doesn't want to show up.
How does one do that? Maybe I need to create another application all together and host it on /admin?
P.S. I am not asking about the security of the approach here. If you want to know anyway, I will try to manage security with firebase (still have to look into it). Thanks.
First, in order to get to admin.html, you need to use ".html" in your URL. So try using localhost:3000/admin.html.
Second, assuming you've made no changes but to duplicate the index.html and rename it admin.html, this will still trigger the routing. You'll need to either create new routing contexts to routing.js in order to control this page, which is a little awkward being it's essentially controlling two separate SPAs, or remove routing.js from your Vulcanized elements.html file so that it can be included only on the main app (index.html). The second option also opens the possibility of having multiple routing.js files so for example your admin.html could essentially become it's own SPA controlled by routing.admin.js.
Good luck!
In CakePHP, is there a way to set admin routing on an URL like this:
...com/admin/articles/
to go to:
View/Admin/Articles/index.ctp
instead of:
View/Articles/admin_index.ctp
My thought is, it would be nice to keep my admin files more separate from my front-end files, since I'd like to re-use my admin over many projects. If this can be done, are their negative side-effects I haven't thought of?
Just set Controller::$viewPath to whatever you need. In your AppController::beforeRender() set $this->viewPath = 'Admin/' . $this->name;
why don't you create a separate app for your admin? Or create a plugin with it? With that you could reuse it in all your projects.
I'm fairly new to CakePHP and am trying to setup a custom admin area for my app. I realize Cake can create an admin area with scaffolding but I'd like to build something much more customized, and have it accessible from via /admin/, with one app for the public side and another for the admin.
Ideally, the structure would be:
www
^- apples (public application here)
^- apples-admin (password-protected control panel)
I'm having a hard time figuring out how to set this up using a single Cake core and two apps - one for "apples" and one for "apples-admin". I've read some notes about modding PHP's include path, but that won't be possible in the production environment. The other notes I see about changing CAKE_CORE_INCLUDE_PATH aren't very clear on where I would make that change, and it doesn't appear as though that would get me the app-inside-app structure I'm after.
Is what I'm trying to do possible? Am I better off using just a single app for both the public side and admin area?
You can achieve what you want using a single application.
To get up and running:
Use Prefix Routing to map your admin actions.
Then use the Auth component to restrict access to your 'admin' actions. I recommend setting up a User model to manage your users and using the FormAuthentication handler for logging in.
If you haven't used Bake for code generation before, then that's also worth looking into. It'll help create a base starting point for a lot of your admin functions.
Good luck.
Is there any quick and easy way to make the backend go to /admin instead of /refinery?
I looked through the docs as well as looked at the gem itself to find any information on this, however I came up with nothing. If this is not possible without major hacking, that would be great to know as well, to be able to pass that info onto my client (i personally could care less about the route).
I added the following line to config/routes.rb. Be aware that this must come before mount Refinery::Core::Engine, :at => '/':
match '/administrator' => redirect('/refinery')
# inserted by Refinery:
mount Refinery::Core::Engine, :at => '/'
This will redirect http://example.com/administrator to http://example.com/refinery which will open up the backend.
Sorry for the delayed response, but I was running into the same problem myself recently.
Instead of redirecting you can also configure the route directly in refinery core config, see here: How do I change the Refinery CMS admin path?
The url structure of my cakephp based site is mysite/cakephp/myapp/index.php/controller/action/input_paramaters
I cannot remove index.php from my url, as I dont have access to httpd.conf file.
Anyways, my question is that I just need to change the url of my homepage to something like http://mysite or mysite/myapp
How would I do that?
Thanks a lot!!
The problem sounds to me that you don't have mod_rewrite enabled or Apache AllowOverwrite is not set properly.
If you don't have mod_rewrite then you cannot change the urls with the pretty ones (provided from CakePHP).
If the AllowOverwrite is not set to On. Then even if you have mod_rewrite enabled, the .htaccess files in your directories doesn't take effect.
I don't know which is worst. Speak with your hosting provider and ask for help.
It is not really clear to me which part of the URL changes. CakePHP routing applies only relative from the cake directory. So if you move from http://example.com/foo to http://www.example.org/bar nothing needs to be changed in Cake.
However you might have hardcoded some img/CSS/JS URL-s that needs some work now. I also use the HTML base tag so my app works perfectly fine under various base URL-s.