# index.php not found

**URL:** <https://forum.mautic.org/t/index-php-not-found/3428>\
**Category:** Product Support\
**Created:** [February 10, 2016, 9:13pm UTC](https://forum.mautic.org/t/index-php-not-found/3428 "2016-02-10T21:13:43Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![doud](https://avatars.discourse-cdn.com/v4/letter/d/76d3ee/32.png) [@doud](https://forum.mautic.org/u/doud)\
**Post date:** [February 10, 2016, 9:13pm UTC](https://forum.mautic.org/t/index-php-not-found/3428/1 "2016-02-10T21:13:43Z")

</div>

Hi everyone,  
  
  
  
I ran into a pretty annoying problem yesterday ![:s]( ":s"). I woke up and received a nice email from AWS telling me that my instance was retiring. Lucky for me, I simple stop and start from the instance was enough. But since I did this, I cannot access my Mautic install anymore. Every time I try to access the site, I get a 404

Quote:

The requested URL /index.php/s/dashboard was not found on this server.

  
I spent some time trying to look for a solution but couldn't find anything relevant for my scenario ![:s]( ":s")  
I saw that the .htaccess was a common source for this problem but mine looks fine:  

Code:

# Use the front controller as index file. It serves as a fallback solution when # every other rewrite/redirect fails (e.g. in an aliased environment without # mod\_rewrite). Additionally, this reduces the matching process for the # start page (path "/") because otherwise Apache will apply the rewriting rules # to each configured DirectoryIndex file (e.g. index.php, index.html, index.pl). #DirectoryIndex index.php RewriteEngine On

```
# Set Authorization header for OAuth1a for when php is running under fcgi
RewriteCond %{HTTP:Authorization} .+
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]

# Determine the RewriteBase automatically and set it as environment variable.
# If you are using Apache aliases to do mass virtual hosting or installed the
# project in a subdirectory, the base path will be prepended to allow proper
# resolution of the app.php file and to redirect to the correct URI. It will
# work in environments without path prefix as well, providing a safe, one-size
# fits all solution. But as you do not need it in this case, you can comment
# the following 2 lines to eliminate the overhead.
RewriteCond %{REQUEST_URI}::$1 ^(/.+)/(.*)::2$
RewriteRule ^(.*) - [E=BASE:%1]

# Redirect to URI without front controller to prevent duplicate content
# (with and without `/app.php`). Only do this redirect on the initial
# rewrite by Apache and not on subsequent cycles. Otherwise we would get an
# endless redirect loop (request -> rewrite to front controller ->
# redirect -> request -> ...).
# So in case you get a "too many redirects" error or you always get redirected
# to the start page because your Apache does not expose the REDIRECT_STATUS
# environment variable, you have 2 choices:
# - disable this feature by commenting the following 2 lines or
# - use Apache >= 2.3.9 and replace all L flags by END flags and remove the
# following RewriteCond (best solution)
RewriteCond %{ENV:REDIRECT_STATUS} ^$
RewriteRule ^index.php(/(.*)|$) %{ENV:BASE}/$2 [R=301,L]

```

RewriteEngine on  
RewriteCond %{REQUEST\_FILENAME} !-s  
RewriteCond %{REQUEST\_FILENAME} !-f  
RewriteCond %{REQUEST\_FILENAME} !-d  
RewriteCond $1 !^(index.php|images|robots.txt)  
RewriteRule ^(.\*)$ /index.php/$1 [L]

```
# If the requested filename exists, simply serve it.
# We only want to let Apache serve files and not directories.
RewriteCond %{REQUEST_FILENAME} -f
RewriteRule .? - [L]

# Rewrite all other queries to the front controller.
RewriteRule .? %{ENV:BASE}/index.php [L]

```

\<IfModule !mod\_rewrite.c\>  
  
# When mod\_rewrite is not available, we instruct a temporary redirect of  
# the start page to the front controller explicitly so that the website  
# and the generated links can still be used.  
RedirectMatch 302 ^(?!/(index.php|index\_dev.php|app|addons|plugins|media|upgrade))(/(.\*))$ /index.php$2  
# RedirectTemp cannot be used instead

  
If anyone has an idea, that would be very appreciated.  
Thanks a lot ![:)]( ":)")  
  
Ed

---

<div class="post-metadata">

**Author:** ![doud](https://avatars.discourse-cdn.com/v4/letter/d/76d3ee/32.png) [@doud](https://forum.mautic.org/u/doud)\
**Post date:** [February 10, 2016, 9:13pm UTC](https://forum.mautic.org/t/index-php-not-found/3428/2 "2016-02-10T21:13:43Z")

</div>

Hi everyone,

I ran into a pretty annoying problem yesterday :s. I woke up and received a nice email from AWS telling me that my instance was retiring. Lucky for me, I simple stop and start from the instance was enough. But since I did this, I cannot access my Mautic install anymore. Every time I try to access the site, I get a 404 [quote]The requested URL /index.php/s/dashboard was not found on this server.[/quote]

I spent some time trying to look for a solution but couldn’t find anything relevant for my scenario :s  
I saw that the .htaccess was a common source for this problem but mine looks fine:

[code]# Use the front controller as index file. It serves as a fallback solution when

# every other rewrite/redirect fails (e.g. in an aliased environment without

# mod\_rewrite). Additionally, this reduces the matching process for the

# start page (path “/”) because otherwise Apache will apply the rewriting rules

# to each configured DirectoryIndex file (e.g. index.php, index.html, index.pl).

#DirectoryIndex index.php

 RewriteEngine On

```
# Set Authorization header for OAuth1a for when php is running under fcgi
RewriteCond %{HTTP:Authorization} .+
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]

# Determine the RewriteBase automatically and set it as environment variable.
# If you are using Apache aliases to do mass virtual hosting or installed the
# project in a subdirectory, the base path will be prepended to allow proper
# resolution of the app.php file and to redirect to the correct URI. It will
# work in environments without path prefix as well, providing a safe, one-size
# fits all solution. But as you do not need it in this case, you can comment
# the following 2 lines to eliminate the overhead.
RewriteCond %{REQUEST_URI}::$1 ^(/.+)/(.*)::2$
RewriteRule ^(.*) - [E=BASE:%1]

# Redirect to URI without front controller to prevent duplicate content
# (with and without `/app.php`). Only do this redirect on the initial
# rewrite by Apache and not on subsequent cycles. Otherwise we would get an
# endless redirect loop (request -> rewrite to front controller ->
# redirect -> request -> ...).
# So in case you get a "too many redirects" error or you always get redirected
# to the start page because your Apache does not expose the REDIRECT_STATUS
# environment variable, you have 2 choices:
# - disable this feature by commenting the following 2 lines or
# - use Apache >= 2.3.9 and replace all L flags by END flags and remove the
# following RewriteCond (best solution)
RewriteCond %{ENV:REDIRECT_STATUS} ^$
RewriteRule ^index.php(/(.*)|$) %{ENV:BASE}/$2 [R=301,L]

```

RewriteEngine on  
RewriteCond %{REQUEST\_FILENAME} !-s  
RewriteCond %{REQUEST\_FILENAME} !-f  
RewriteCond %{REQUEST\_FILENAME} !-d  
RewriteCond $1 !^(index.php|images|robots.txt)  
RewriteRule ^(.\*)$ /index.php/$1 [L]

```
# If the requested filename exists, simply serve it.
# We only want to let Apache serve files and not directories.
RewriteCond %{REQUEST_FILENAME} -f
RewriteRule .? - [L]

# Rewrite all other queries to the front controller.
RewriteRule .? %{ENV:BASE}/index.php [L]

```

\<IfModule !mod\_rewrite.c\>  
  
# When mod\_rewrite is not available, we instruct a temporary redirect of  
# the start page to the front controller explicitly so that the website  
# and the generated links can still be used.  
RedirectMatch 302 ^(?!/(index.php|index\_dev.php|app|addons|plugins|media|upgrade))(/(.\*))$ /index.php$2  
# RedirectTemp cannot be used instead  
  
  
[/code]

If anyone has an idea, that would be very appreciated.  
Thanks a lot 🙂

Ed

---

<div class="post-metadata">

**Author:** ![escopecz](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/escopecz/32/370_2.png) [@escopecz](https://forum.mautic.org/u/escopecz)\
**Post date:** [February 11, 2016, 11:34am UTC](https://forum.mautic.org/t/index-php-not-found/3428/3 "2016-02-11T11:34:05Z")

</div>

.htaccess can look fine but the server doesn’t have to load it. You should make sure the .htaccess is enabled.

[https://www.digitalocean.com/community/tutorials/how-to-use-the-htaccess-file](https://www.digitalocean.com/community/tutorials/how-to-use-the-htaccess-file)

---

<div class="post-metadata">

**Author:** ![doud](https://avatars.discourse-cdn.com/v4/letter/d/76d3ee/32.png) [@doud](https://forum.mautic.org/u/doud)\
**Post date:** [February 11, 2016, 9:22pm UTC](https://forum.mautic.org/t/index-php-not-found/3428/4 "2016-02-11T21:22:03Z")

</div>

I did find the solution. It was an alias problem in my mautic.conf (entirely my fault, I don’t know much about servers).  
Thanks for the help!
