domainname.com/admin
I want to hide this IF someone tries to type in url address bar I want to redirect them to main page.
instead of opening admin login menu.
May be in future release of opencart we can have prefix for admin folder and files so that each user gets a unique admin folder.
or any htaccess edit so that someone enters admin folder in url bar is redirected to main page.
I want to hide this IF someone tries to type in url address bar I want to redirect them to main page.
instead of opening admin login menu.
May be in future release of opencart we can have prefix for admin folder and files so that each user gets a unique admin folder.
or any htaccess edit so that someone enters admin folder in url bar is redirected to main page.
As a matter of course, in all Open Source applications, I change the default admin path which side-steps the vast majority of probes for next to no effort. It is simply a case of renaming the folder and changing the admin config.php
If someone tries to YourOpencartShop.com/admin, by default, it goes into the front-end shop and is handled correctly with 'The page you requested cannot be found', or whatever polite message you have set in catalog\language\english\error\not_found.php
I like this better, but I guess you could add redirect permanent old_url new_url to .htaccess if you wanted.
If someone tries to YourOpencartShop.com/admin, by default, it goes into the front-end shop and is handled correctly with 'The page you requested cannot be found', or whatever polite message you have set in catalog\language\english\error\not_found.php
I like this better, but I guess you could add redirect permanent old_url new_url to .htaccess if you wanted.
Free v1.4.9 Extensions: Default Specials | Improved Search | Customer Activity Report | Customer Groups | Royal Mail With Handling | Improved Product Page | Random Products | Stock Report | All Products
hi
thanks very much
no I think config.php is better option
.htaccess i said because i was unaware of this simple option I will try it now.
please advice which one to rename
http, https, dir
admin is in these three option or we rename all of them.
can we do same with Image folder?
thankyou very much for your help.
thanks very much
no I think config.php is better option
.htaccess i said because i was unaware of this simple option I will try it now.
please advice which one to rename
http, https, dir
admin is in these three option or we rename all of them.
can we do same with Image folder?
thankyou very much for your help.
In YourAdmin/config.php, You need to set YourAdmin in:
If you don't have HTTPS, it needs to be set the same as HTTP
Obviously, YourAdmin must match the new name of your folder.
Code: Select all
// HTTP
define('HTTP_SERVER', 'http://www.YourDomain.com/YourAdmin/');
// HTTPS
define('HTTPS_SERVER', 'http://www.YourDomain.com/YourAdmin/');
// DIR
define('DIR_APPLICATION', '/YourSiteRoot/YourAdmin/');
define('DIR_LANGUAGE', '/YourSiteRoot/YourAdmin/language/');
define('DIR_TEMPLATE', '/YourSiteRoot/YourAdmin/view/template/');
Obviously, YourAdmin must match the new name of your folder.
Free v1.4.9 Extensions: Default Specials | Improved Search | Customer Activity Report | Customer Groups | Royal Mail With Handling | Improved Product Page | Random Products | Stock Report | All Products
thanks very much
is there any way we can use to avoid search engine and robots crawling this directory?
other than robot.txt?
or robot.txt is the best option?
is there any way we can use to avoid search engine and robots crawling this directory?
other than robot.txt?
or robot.txt is the best option?
I use robots.txt:
I don't know if it is the best, I just replicated what comes with wordpress. 
Code: Select all
User-agent: *
Disallow: /YourAdmin/
Disallow: /system/

Free v1.4.9 Extensions: Default Specials | Improved Search | Customer Activity Report | Customer Groups | Royal Mail With Handling | Improved Product Page | Random Products | Stock Report | All Products
I used robots meta tags in the admin/view/template/common/header.tpl file
As shown here http://www.robotstxt.org/meta.html
No idea if that is useful,or necessary - that's just what I did.
robots.txt in the root has a slight disadvantage, in that your disallowed folder names can be seen by anyone - though I don't think anyone but the most determined hacker would bother looking
Code: Select all
...
<head>
<title><?php echo $title; ?></title>
<meta name="robots" content="noindex, nofollow">
...
No idea if that is useful,or necessary - that's just what I did.
robots.txt in the root has a slight disadvantage, in that your disallowed folder names can be seen by anyone - though I don't think anyone but the most determined hacker would bother looking

Who is online
Users browsing this forum: No registered users and 91 guests