1

I know this topic has been posted before, but my problem seems to be slightly different and also I am only a beginner and the previous answers were too complicated for me.

Here is my problem: I have been trying to move my website from Local to Live. I have successfully moved the files and the database. I can now access my home page, but my admin page can only be accessed by www.mydomain.com/index.php/admin, I want to access it through www.mydomain.com/admin. I have read that this is due to my mod_rewrite not working.

Can someone please tell me how to enable my mod_rewrite in simple terms?

My local server is MAMP. I am using cPanel. I have been using this step-by-step guide to move my website from Local to Live.

1 Answer 1

1

The short answer is that the ability to use mod_rewrite to clean up the urls isn't available for admin, so all answers would be custom htaccess rules, which you have referenced you're not comfortable with.

@clockworkgeek has an extension that will do this, but I haven't tried it:

http://www.magentocommerce.com/magento-connect/clockworkgeek/extension/3692/clockworkgeek_adminrewrites

If you would like to proceed, there are some suggestions at the below link. The following quote is also a walkthrough of how it would be accomplished via htaccess:

I created a directory named “admin” in my document root. I then used a .htaccess file which restricted access to this directory.

In the site’s main .htaccess file, directly after the following line:

RewriteRule .* index.php [L]
I added these lines: 
# These lines rewrite /index.php/admin to /admin.
RewriteCond %{REQUEST_URI} ^/index.php/admin.*$
RewriteRule ^index.php/admin(.*) /admin$1 [R]

# These lines are needed to prevent Apache from serving
# up the /admin folders directory index when a request is
# made for "/admin" or "/admin/".
RewriteCond %{REQUEST_URI} ^/admin/?$
RewriteRule (.*) $1/dashboard

Now, If I go to a URL like this, http://www.mydomain.com/index.php/admin/index/index/key/mykey/

Source: http://www.magentocommerce.com/boards/viewthread/34357/

1
  • Thank you for your reply. I have had a look at the extension and I will think about installing it, if I do install it I will report back with how well it works. Before I started using MAMP and creating sites locally, I just created them on the live server, and my admin would always be located at www.mydomain.com/admin. But when I moved my site from local to live it changed to www.mydomain.com/index.php/admin. You have informed that mod_rewrite is not available to clean up URL's for admin, but do you know why my admin has moved to /index.php/admin in the first place? Thanks again
    – conor500
    Commented May 31, 2013 at 20:38

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.