enable mod_rewrite
-
16-10-2019 - |
سؤال
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.
المحلول
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:
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/