0

I have a directory in my Apache web service. If I have no configuration file in it I can access a test.php file in it, but as soon as I add the following .htaccess file I get a 404 error.

Why and what do needs to be added or changed in the .htaccess file?

<IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    # NOTE: If you added a web_prefix to config, add it here too, e.g.:
    RewriteRule (.*) /shindig/index.php [L]
    #RewriteRule (.*) index.php [L]
    # for OAuth signatures to work for POSTed data,
    # always_populate_raw_data needs to be turned on
    php_flag always_populate_raw_post_data On
    php_flag magic_quotes_gpc Off
</IfModule>
3
  • Access denied, do you mean forbidden? That isn't a 404... Commented Dec 1, 2010 at 11:11
  • I receive 404 and today the error message is in ... Japanese!! The server is in the cloud so I don't really know why Japanese, so I guess is Access forbiden then , but the code is 404 for sure. Commented Dec 1, 2010 at 11:17
  • Can you try with removing these two lines php_flag always_populate_raw_post_data On php_flag magic_quotes_gpc Off Commented Dec 1, 2010 at 13:21

2 Answers 2

1

Temporarily change to [L] to [L,R], and see if it is redirecting.

It may just need removing the / before shindig to get it working.

Sign up to request clarification or add additional context in comments.

Comments

0

The problem wasn't actualy htaccess file but the index.php that was doing further redirecting to other not existing files. Thanks everyone

Comments

Your Answer

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

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.