php - Can't redirect with .htaccess -


At the end of my rope, whatever should not be done.

I am new to building the website and I saw that my visitors were trying to reach some pages and get prohibited warnings, like: www.test.com/test 403 returns the error.

What I have to do is to do this: Www.test.com/test will redirect it to a test.html file in a directory above it.

Tried to do this with .htaccess in the root directory

  Redirect / test www.test.com/test.html   

does not work just gives me 403 error.

Tried to redirect a simple index.html file without any

    

But this does not work either.

In fact, it is not certain that due to these two the work has been refused.

The header parameter must be wrapped in double quotes. E.g.

  header ("location: www.test.com/test.html"); Go out();   

Also make sure that your file identifies your file extension as a php file, if it does not have a .php file extension, you can httpd.conf Can add custom extensions by editing

Comments

Popular posts from this blog

php - PDO bindParam() fatal error -

logging - How can I log both the Request.InputStream and Response.OutputStream traffic in my ASP.NET MVC3 Application for specific Actions? -

java - Why my included JSP file won't get processed correctly? -