Magento Forum

   
htaccess rewrite hides /shop in url but I can’t access admin
 
Ilailli
Jr. Member
 
Total Posts:  4
Joined:  2013-06-16
 

I prepared my site in the default magento folder.
The site is ready so I modified .htaccess as follows in root and magento folder

############################################
## enable rewrites

Options +FollowSymLinks
RewriteEngine on
RewriteBase /
RewriteCond %{REQUEST_URI} !^/magento(.*)
RewriteRule (.*) /magento/$1 [L]

############################################
## you can put here your magento root folder
## path relative to web root

RewriteBase /magento/

############################################

The site works frontend and goes straight to the /magento/ folder and doesn’t show it in the url. Great.
However I can’t access the admin.
http://www.myurl.com/admin takes me to the admin logon page. It evens checks that the user is valid.
I logon and it gives me my 404 page.

http://www.ilailli.it/index.php/admin/index/index/key/54b24e404c5ae15d6445b8c46cb42c67/

I have seen several similar posts on hiding magento folders but no answer on the admin side.

Chris

 
Magento Community Magento Community
Magento Community
Magento Community
 
JLHC
Mentor
 
Avatar
Total Posts:  1287
Joined:  2008-05-09
Tampa, FL
 

Is there any reason on why do you not just move the files to the root directory?

This will save you all the hassles that come with .htaccess rewrites and any performance overhead that it brings.

 
Magento Community Magento Community
Magento Community
Magento Community
 
Ilailli
Jr. Member
 
Total Posts:  4
Joined:  2013-06-16
 

Thanks for the reply.
I used standard installare for magento which put magento in its own folder.
So I thought there must be some standard way of redirecting the domain into the folder which was not hard.
Unfortunately I still can’t access admin.

Anyway If I move it as you say should I just brutally copy files and folders up a level into root?

If I do it will I have to update some parameters somewhere?

thanks again

 
Magento Community Magento Community
Magento Community
Magento Community
 
JLHC
Mentor
 
Avatar
Total Posts:  1287
Joined:  2008-05-09
Tampa, FL
 
Ilailli - 12 July 2013 03:07 AM

Thanks for the reply.
I used standard installare for magento which put magento in its own folder.
So I thought there must be some standard way of redirecting the domain into the folder which was not hard.
Unfortunately I still can’t access admin.

Anyway If I move it as you say should I just brutally copy files and folders up a level into root?

If I do it will I have to update some parameters somewhere?

thanks again

Moving the files should do it as long as you are using the default .htaccess for Magento.

 
Magento Community Magento Community
Magento Community
Magento Community
 
Ilailli
Jr. Member
 
Total Posts:  4
Joined:  2013-06-16
 

OK. I think I’ll try it.
Have you any suggestions on what the secure and unsecrure url settings should be?

thanks again

 
Magento Community Magento Community
Magento Community
Magento Community
 
JLHC
Mentor
 
Avatar
Total Posts:  1287
Joined:  2008-05-09
Tampa, FL
 
Ilailli - 12 July 2013 03:59 AM

OK. I think I’ll try it.
Have you any suggestions on what the secure and unsecrure url settings should be?

thanks again

They should be updated to “www.yourdomain.com”.

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
    Back to top