Post by jontycasson » Wed Apr 13, 2011 2:09 am

When I try to access my admin (http://www.yoursite.com/admin), because of the SEO being switched on it takes me to a page unavailable on the website...

I can change the .htaccess file to .htaccess.txt and it lets me on but I dont want to be changing that every time I need to log onto admin.

Is there a way around this?

Many Thanks

Jonty.

Image
Vidal Cassoon - Hair and Beauty Specialists


New member

Posts

Joined
Wed Apr 13, 2011 2:01 am
Location - Cheshire

Post by SXGuy » Wed Apr 13, 2011 4:27 am

SEO urls should not affect loging in to admin. So it is an issue with your set up, not opencart seo urls.

You should check the config.php file in yout admin folder and see if you have the correct paths set up.

You should also check any new code you have added to the .htaccess file as this could be causing the error.

Active Member

Posts

Joined
Sun Nov 08, 2009 2:07 am

Post by jontycasson » Thu Apr 14, 2011 1:28 am

Thanks for the reply SXGuy,

Ive had a look at my config.php in admin... all looks fine with the .com/admin looking correct...

Ive not touched the .htaccess other than to rename it to .htaccess.txt

Im still experiencing the issue when I attempt to access the admin section. Its just taking to a page not found on the website...

Any further suggestions would be much appreciated.

Thanks

Image
Vidal Cassoon - Hair and Beauty Specialists


New member

Posts

Joined
Wed Apr 13, 2011 2:01 am
Location - Cheshire

Post by jontycasson » Wed Apr 20, 2011 5:42 am

Im still experiencing this problem... has anyone got any further suggestions?

SXGuy could you tell me what the correct path should look like in the config.php file?

Thanks Guys

Image
Vidal Cassoon - Hair and Beauty Specialists


New member

Posts

Joined
Wed Apr 13, 2011 2:01 am
Location - Cheshire

Post by SXGuy » Wed Apr 20, 2011 6:24 am

two config.php files, one is in your root folder, main domain name path, the other is in /admin.

Other than that, i have no idea why you can not access your admin, but i do know, it is not a seo problem.

You should also make sure you are using the standard .htaccess file that comes with opencart, and not some heavy modified version

Active Member

Posts

Joined
Sun Nov 08, 2009 2:07 am

Post by jontycasson » Wed Apr 20, 2011 6:57 am

could you advise me on a some code to add to my .htaccess file for it to potentially work?

Thanks for all your help so far..

Image
Vidal Cassoon - Hair and Beauty Specialists


New member

Posts

Joined
Wed Apr 13, 2011 2:01 am
Location - Cheshire

Post by SXGuy » Wed Apr 20, 2011 3:20 pm

Code: Select all

# 1.To use URL Alias you need to be running apache with mod_rewrite enabled. 

# 2. In your opencart directory rename htaccess.txt to .htaccess

# For any support issues please visit: http://www.opencart.com

Options +FollowSymlinks

# Prevent Directoy listing 
Options -Indexes

# Prevent Direct Access to files
<FilesMatch "\.(tpl|ini|log|txt)">
 Order deny,allow
 Deny from all
</FilesMatch>

# SEO URL Settings
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^([^?]*) index.php?_route_=$1 [L,QSA]


### Additional Settings that may need to be enabled for some servers 
### Uncomment the commands by removing the # sign in front of it.
### If you get an "Internal Server Error 500" after enabling, then restore the # as this means your host doesn't allow that.

# 1. If your cart only allows you to add one item at a time, it is possible register_globals is on. This may work to disable it:
# php_flag register_globals off

# 2. If your cart has magic quotes enabled, This may work to disable it:
# php_flag magic_quotes_gpc Off
make sure you save it as ".htaccess" without the quotes. and place it in the top most folder via ftp.

Active Member

Posts

Joined
Sun Nov 08, 2009 2:07 am

Post by jontycasson » Thu Apr 21, 2011 12:52 am

I tried the code you supplied me with and this didn't change anything.

I do have a password protect on my .htaccess file

I have removed some code from the admin .htaccess file that was directing to a .htpasswd file on my local directory.
so it now reads like this... is this ok?

Code: Select all

AuthType Basic
AuthName "admin"
This seems to have solved my problems...

One more quick question, do i actually need to password protect my .htaccess file?


SXGuy you've been a great help... thanks

Image
Vidal Cassoon - Hair and Beauty Specialists


New member

Posts

Joined
Wed Apr 13, 2011 2:01 am
Location - Cheshire

Post by SXGuy » Thu Apr 21, 2011 2:54 pm

no, you dont really need to password protect anything.

If you are worried, you can create a robots.txt file and deny page crawling to your admin area, you can also change the name of your admin folder to something else if you wished, providing the config.php files point to the new folder name.

Active Member

Posts

Joined
Sun Nov 08, 2009 2:07 am

Post by Daniel » Fri Apr 22, 2011 2:10 am

contact your host sometimes they forbid access to directories called admin.

OpenCart®
Project Owner & Developer.


User avatar
Administrator

Posts

Joined
Fri Nov 03, 2006 6:57 pm

Post by i2Paq » Fri Apr 22, 2011 2:15 am

Why not rename admin to backoffice?

Norman in 't Veldt
Moderator OpenCart Forums

_________________ READ and Search BEFORE POSTING _________________

Our FREE search: Find your answer FAST!.

[How to] BTW + Verzend + betaal setup.


User avatar
Global Moderator

Posts

Joined
Mon Nov 09, 2009 7:00 pm
Location - Winkel - The Netherlands

Post by maperdel » Sun Jun 19, 2011 1:40 am

I had the exactly same issue on with my site. That happened when I password-protected my admin folder. I took the protection out and my problem solved.

Zapatos Andrea - Andrea Zapatos


New member

Posts

Joined
Sat Mar 26, 2011 6:38 am


Post by amboss » Tue Sep 06, 2011 8:07 pm

Trying to password protect your admin folder using cpanel (adding an .htaccess file under admin folder) makes you get "page not found" error.

It may be solved by adding the following line into the .htaccess file in the admin folder.

Code: Select all

RewriteEngine Off

emreyuce.com | datekiss.com | tamsepetlik.com | undobilisim.com


Newbie

Posts

Joined
Sat Aug 27, 2011 8:05 pm

Post by teesar » Thu Dec 13, 2012 4:14 am

amboss wrote:Trying to password protect your admin folder using cpanel (adding an .htaccess file under admin folder) makes you get "page not found" error.

It may be solved by adding the following line into the .htaccess file in the admin folder.

Code: Select all

RewriteEngine Off
This didn't work....

Sorry for bringing this old thread up, but after searching everything, I am still getting this same error as OP.
I know it's something really simple, but can't get it to work.

Having the exact problem as this thread indicates:
-using friendly seo's, everything working fine
-add htaccess either through cPanel OR manually, nets me the same results:
The page you requested cannot be found!

Please help?

Version 1.5.3.1 with a purchased theme.

Thanks.

User avatar
Newbie

Posts

Joined
Wed Dec 12, 2012 2:46 am

Post by teesar » Thu Dec 13, 2012 11:54 pm

any thoughts at all?
which direction I should go in?
anyone?

User avatar
Newbie

Posts

Joined
Wed Dec 12, 2012 2:46 am

Post by Fearghal » Thu Dec 20, 2012 11:25 am

Also had this problem.

Managed to resolve by creating a custom 401.shtml in the root directory.

Newbie

Posts

Joined
Mon Dec 10, 2012 6:51 am

Post by tolinho » Wed Jan 02, 2013 12:00 am

Hi,
I also have this issue.
I understand it only occours if the folder is password protected via htaccess file.

The issue is I have a couple of other folders I need to password protect, including admin folder.
And with seo enabled on opencart I cant manage to access them.

Is there any way to over come this?

In the htaccess file that would file to protected I have tryed suggestions obeve, but diddent work:
RewriteEngine Off

AuthName "Go Away"
AuthUserFile "/home/***/.htpasswds/public_html/admin/passwd"
AuthType Basic
require valid-user

Any help is much appreciated.
Thanks

New member

Posts

Joined
Sat Jul 21, 2012 2:01 am

Post by BigLen » Thu Oct 23, 2014 5:03 am

This issue, (like so many others) seems to have been around for awhile. Would someone please put up a detailed *SOLVED* post, if that's the case? ???

Thank you!

Big Len
https://BigLensCycles.com

Image
Quality Motorcycle ATV and UTV Parts & Accessories - Discount Prices


New member

Posts

Joined
Sun Sep 07, 2014 7:04 am
Who is online

Users browsing this forum: No registered users and 3 guests