Answers.Body: <p>I had the same issue on my mac and struggled for hours.</p>
  
  <p>Having the right .htaccess file in place was key, but if you are not getting Craft's error messages, that's a sign your .htaccess file is not having any effect (you can verify this by placing some random text in there and see if you get an internal server error or not).</p>
  
  <p>Making the following changes to httpd.conf made .htaccess work and solved this issue for me: </p>
  
  <ul>
  <li>Change from "AllowOverride None" to AllowOverride All" in the
  document root directory block</li>
  <li>Uncomment LoadModule rewrite_module...</li>
  </ul>
  
  <p>I hope this helps someone solve this quicker than I did.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-07-11T09:23:23.270Z
Answers.LastActivityDate: 2019-07-11T09:23:23.270Z
Answers.UserDisplayName: Topolino
Answers.Body: <p>As Brad Bell pointed out in a comment that you should use index.php, it might have something to do with your .htaccess and general.php</p>
  
  <p>Your .htaccess File should look something similair to this:</p>
  
  <pre><code>&lt;IfModule mod_rewrite.c&gt;
      RewriteEngine On
      RewriteBase /
  
      # Send would-be 404 requests to Craft
      RewriteCond %{REQUEST_FILENAME} !-f
      RewriteCond %{REQUEST_FILENAME} !-d
      RewriteCond %{REQUEST_URI} !^/(favicon\.ico|apple-touch-icon.*\.png)$ [NC]
      RewriteRule (.+) index.php?p=$1 [QSA,L]
  &lt;/IfModule&gt;
  </code></pre>
  
  <p>This doens't do the trick yet though.
  In your <code>craft/config/general.php</code> you have to add:
  <code>'omitScriptNameInUrls' =&gt; true,</code> Now you should be able to access your admin panel with: ronvanderwerf.loc/admin/ </p>
  
  <p>You can find a more indept explanation in the docs here:</p>
  
  <p><a href="https://craftcms.com/support/remove-index.php" rel="nofollow noreferrer">https://craftcms.com/support/remove-index.php</a></p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-03-21T12:59:27.740Z
Answers.LastActivityDate: 2017-03-21T12:59:27.740Z
Answers.UserDisplayName: Justin Dekkers
Answers.Body: <p>Try instead</p>
  
  <pre><code>$craftPath = 'craft';
  </code></pre>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-02-21T00:30:19.437Z
Answers.Text: Can you show the contents of db.php?
Answers.UserDisplayName: Cem Meric
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-02-21T18:38:01.283Z
Answers.Text: I prefer to keep the details private. But this is how it looks like:
  `<?php
  
  return array(
          'server' => ''127.0.0.1",
          'user' => 'user',
          'password' => 'password',
          'database' => 'ronvanderwerf'
  );`
Answers.UserDisplayName: Mr. Sam
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-02-22T20:32:51.073Z
Answers.Text: If ronvanderwerf.loc/index.php?p=admin is taking you to new installation page and you had already setup the site before making those changes to move from localhost to ronvanderwerf.loc, I'd say something changed with db server in Wamp. Try playing with 'server' => ''127.0.0.1" setting in db.php
Answers.UserDisplayName: Cem Meric
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-02-25T20:23:24.073Z
Answers.Text: I'm trying to setup the site. ronvanderwerf.loc/admin should bring me to the installation of craft. Instead of that, I get a 404 not found.
  I did try using "127.0.0.1" but that didn't made any difference.
  I think I've made a mistake defining the paths (for the admin). But I don't know where, or how to fix this.
Answers.UserDisplayName: Mr. Sam
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-02-19T22:05:25.680Z
Answers.Text: Unfortunately that didn't help
Answers.UserDisplayName: Mr. Sam
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-02-19T11:51:41.323Z
Answers.LastActivityDate: 2017-02-19T11:51:41.323Z
Answers.UserDisplayName: Cem Meric
Body: <p>It's the first time I'm using Wamp for local hosting my Craft website.
  I've changed my Windows and Wamp apache host file for accessing my domainname instead of localhost. (<em>ronvanderwerf.loc</em> instead of <em>localhost</em>)</p>
  
  <p>The front-end of the website looks fine:</p>
  
  <p><a href="https://i.sstatic.net/Ft2I1.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/Ft2I1.png" alt="enter image description here"></a>
  (I'm getting a error because I still need to setup Craft)</p>
  
  <p>The problem is, I can't access the admin panel. I get a 404 Not Found.</p>
  
  <p>I've changed the directory order of my project for some hosting reasons:</p>
  
  <p><a href="https://i.sstatic.net/Gy5zX.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/Gy5zX.png" alt="enter image description here"></a></p>
  
  <p><strong>My apache host file:</strong></p>
  
  <pre><code>&lt;VirtualHost *:80&gt;
  ServerName ronvanderwerf.loc
  DocumentRoot c:/wamp64/www
  &lt;Directory  "c:/wamp64/www/"&gt;
      Options +Indexes +Includes +FollowSymLinks +MultiViews
      AllowOverride All
      Require local
  &lt;/Directory&gt;
  </code></pre>
  
  <p></p>
  
  <p><strong>My root htaccess file:</strong></p>
  
  <pre><code>&lt;IfModule mod_rewrite.c&gt;
  RewriteBase /
  
  # Send would-be 404 requests to Craft
  RewriteCond %{REQUEST_FILENAME} !-f
  RewriteCond %{REQUEST_FILENAME} !-d
  RewriteCond %{REQUEST_URI} !^/(favicon\.ico|apple-touch-icon.*\.png)$ [NC]
  RewriteRule (.+) index.php?p=$1 [QSA,L]
  </code></pre>
  
  <p></p>
  
  <p>I hope someone can help me.</p>
  
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2017-02-21T18:33:08.983Z
Comments.Text: @BradBell I can access `ronvanderwerf.loc/index.php?p=admin`
Comments.UserDisplayName: Mr. Sam
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2017-02-21T18:41:28.807Z
Comments.Text: @ClivePortman I tried it, but unfortunately it didn't made any difference
Comments.UserDisplayName: Mr. Sam
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2017-02-21T19:07:44.073Z
Comments.Text: If you can access ronvanderwerf.loc/index.php?p=admin, did it bring you to the installation page?  Or what did you see?
Comments.UserDisplayName: Brad Bell
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2017-02-21T19:31:55.397Z
Comments.Text: @BradBell It brings me to the installation page ;)
Comments.UserDisplayName: Mr. Sam
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2017-03-07T21:39:29.403Z
Comments.Text: @BradBell What should I do?
Comments.UserDisplayName: Mr. Sam
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2017-03-07T21:49:17.053Z
Comments.Text: Not sure what the issue is now?  If you can get to the installation page, then just go through the installation process?
Comments.UserDisplayName: Brad Bell
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2017-03-08T21:14:35.857Z
Comments.Text: @BradBell I was looking for a solution so I can access the admin through `ronvanderwerf.loc/admin` instead of `ronvanderwerf.loc/index.php?p=admin`.
  
  I've achieved this by using a redirect in htaccess, but I was wondering if there is a other solution.
Comments.UserDisplayName: Mr. Sam
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2017-02-20T00:22:22.887Z
Comments.Text: What if you access `ronvanderwerf.loc/index.php?p=admin`?
Comments.UserDisplayName: Brad Bell
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2017-02-20T10:20:21.840Z
Comments.Text: Can you try this: http://stackoverflow.com/questions/7670561/how-to-get-htaccess-to-work-on-mamp
Comments.UserDisplayName: Clive Portman
Tags: <control-panel><admin><404><apache><hosting>
Title: Can't access admin panel
ThreadText: # Can't access admin panel
  
  (Asked by: username_0 on 2017-02-19)
  
  It's the first time I'm using Wamp for local hosting my Craft website.
  I've changed my Windows and Wamp apache host file for accessing my domainname instead of localhost. (*ronvanderwerf.loc* instead of *localhost*)
  
  The front-end of the website looks fine:
  
  [![enter image description here](https://i.sstatic.net/Ft2I1.png)](https://i.sstatic.net/Ft2I1.png)
  (I'm getting a error because I still need to setup Craft)
  
  The problem is, I can't access the admin panel. I get a 404 Not Found.
  
  I've changed the directory order of my project for some hosting reasons:
  
  [![enter image description here](https://i.sstatic.net/Gy5zX.png)](https://i.sstatic.net/Gy5zX.png)
  
  **My apache host file:**
  
  ```
  <VirtualHost *:80>
  ServerName ronvanderwerf.loc
  DocumentRoot c:/wamp64/www
  <Directory  "c:/wamp64/www/">
      Options +Indexes +Includes +FollowSymLinks +MultiViews
      AllowOverride All
      Require local
  </Directory>
  
  ```
  
  **My root htaccess file:**
  
  ```
  <IfModule mod_rewrite.c>
  RewriteBase /
  
  # Send would-be 404 requests to Craft
  RewriteCond %{REQUEST_FILENAME} !-f
  RewriteCond %{REQUEST_FILENAME} !-d
  RewriteCond %{REQUEST_URI} !^/(favicon\.ico|apple-touch-icon.*\.png)$ [NC]
  RewriteRule (.+) index.php?p=$1 [QSA,L]
  
  ```
  
  I hope someone can help me.
  
  **Tags:** control-panel, admin, 404, apache, hosting
  
  > **Comments:**
  > **username_1**: What if you access `ronvanderwerf.loc/index.php?p=admin`?  
  > **username_2**: Can you try this: http://stackoverflow.com/questions/7670561/how-to-get-htaccess-to-work-on-mamp  
  > **username_0**: @username_1 I can access `ronvanderwerf.loc/index.php?p=admin`  
  > **username_0**: @username_2 I tried it, but unfortunately it didn't made any difference  
  > **username_1**: If you can access ronvanderwerf.loc/index.php?p=admin, did it bring you to the installation page?  Or what did you see?  
  > **username_0**: @username_1 It brings me to the installation page ;)  
  > **username_0**: @username_1 What should I do?  
  > **username_1**: Not sure what the issue is now?  If you can get to the installation page, then just go through the installation process?  
  > **username_0**: @username_1 I was looking for a solution so I can access the admin through `ronvanderwerf.loc/admin` instead of `ronvanderwerf.loc/index.php?p=admin`.  I've achieved this by using a redirect in htaccess, but I was wondering if there is a other solution.  
  
  ---
  
  ## 3 answers
  
  ### Answer by username_3 on 2019-07-11. Score: 3
  
  I had the same issue on my mac and struggled for hours.
  
  Having the right .htaccess file in place was key, but if you are not getting Craft's error messages, that's a sign your .htaccess file is not having any effect (you can verify this by placing some random text in there and see if you get an internal server error or not).
  
  Making the following changes to httpd.conf made .htaccess work and solved this issue for me:
  
  * Change from "AllowOverride None" to AllowOverride All" in the
    document root directory block
  * Uncomment LoadModule rewrite\_module...
  
  I hope this helps someone solve this quicker than I did.
  
  
  ---
  
  ### Answer by username_4 on 2017-03-21. Score: 2
  
  As username_1 username_1 pointed out in a comment that you should use index.php, it might have something to do with your .htaccess and general.php
  
  Your .htaccess File should look something similair to this:
  
  ```
  <IfModule mod_rewrite.c>
      RewriteEngine On
      RewriteBase /
  
      # Send would-be 404 requests to Craft
      RewriteCond %{REQUEST_FILENAME} !-f
      RewriteCond %{REQUEST_FILENAME} !-d
      RewriteCond %{REQUEST_URI} !^/(favicon\.ico|apple-touch-icon.*\.png)$ [NC]
      RewriteRule (.+) index.php?p=$1 [QSA,L]
  </IfModule>
  
  ```
  
  This doens't do the trick yet though.
  In your `craft/config/general.php` you have to add:
  `'omitScriptNameInUrls' => true,` Now you should be able to access your admin panel with: ronvanderwerf.loc/admin/
  
  You can find a more indept explanation in the docs here:
  
  <https://craftcms.com/support/remove-index.php>
  
  
  ---
  
  ### Answer by username_5 on 2017-02-19. Score: 0
  
  Try instead
  
  ```
  $craftPath = 'craft';
  
  ```
  
  > **Comments:**
  > **username_0**: Unfortunately that didn't help  
  > **username_5**: Can you show the contents of db.php?  
  > **username_0**: I prefer to keep the details private. But this is how it looks like: `<?php  return array(         'server' => ''127.0.0.1",         'user' => 'user',         'password' => 'password',         'database' => 'ronvanderwerf' );`  
  > **username_5**: If ronvanderwerf.loc/index.php?p=admin is taking you to new installation page and you had already setup the site before making those changes to move from localhost to ronvanderwerf.loc, I'd say something changed with db server in Wamp. Try playing with 'server' => ''127.0.0.1" setting in db.php  
  > **username_0**: I'm trying to setup the site. ronvanderwerf.loc/admin should bring me to the installation of craft. Instead of that, I get a 404 not found. I did try using "127.0.0.1" but that didn't made any difference. I think I've made a mistake defining the paths (for the admin). But I don't know where, or how to fix this.  
  
  ---
  
  