HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials

HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials (http://www.howtoforge.com/forums/index.php)
-   Technical (http://www.howtoforge.com/forums/forumdisplay.php?f=8)
-   -   i can access php files without typeing extensions (http://www.howtoforge.com/forums/showthread.php?t=54069)

Helstedxd 7th September 2011 10:57

i can access php files without typeing extensions
 
Hi HowToForge

I have set a Debian minimal 6 LAMP server up, and i have enabled mod_rewrite, but when i make a .htaccess file and write index.html i get a Error 404, but i can access the index.php without typeing the php extension, like http://domain/index

my .htaccess

Code:

RewriteEngine on
RewriteRule (.*)\.html $1.php

i hope some of you can help me with my problem

//Kasper Helsted

robsbots 19th November 2011 13:50

Google say's.....
 
Hi Helstedxd

I did a quick google on the problem and it spat this out :-

Code:

RewriteEngine on
RewriteRule index\.html index.php [NC,R]

NC means it is not case sensitive: index=INDEX=InDeX and R is the redirect.

Give it a try and see if it does what you require.

My source was here about a third of the way down the page.

manojsamtani 20th December 2011 13:55

You can use apache mime/content-negotiation...its easy to use :)


--
Manoj
apache-dos-attack.blogspot.com


All times are GMT +2. The time now is 04:51.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.