Go Back   HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials > Linux Forums > Technical

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
Reply
 
Thread Tools Display Modes
  #1  
Old 7th September 2011, 10:57
Helstedxd Helstedxd is offline
Junior Member
 
Join Date: Jun 2011
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default 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
Reply With Quote
Sponsored Links
  #2  
Old 19th November 2011, 13:50
robsbots robsbots is offline
Junior Member
 
Join Date: Nov 2011
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
Default 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.
Reply With Quote
  #3  
Old 20th December 2011, 13:55
manojsamtani manojsamtani is offline
Junior Member
 
Join Date: Jun 2011
Location: India
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
 
Default

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


--
Manoj
apache-dos-attack.blogspot.com
Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Centos 6.0 support Acid_Scorpion Developers' Forum 47 16th September 2011 10:36
Cron errors guimnk General 1 5th April 2011 09:20
Multiserver setup: repquota command not found. CSsab Installation/Configuration 2 27th January 2011 15:11
Access forbidden for php files in browser... html files work just fine krissie Server Operation 2 30th June 2010 12:08
php script injections Grizzly General 21 18th July 2006 08:55


All times are GMT +2. The time now is 13:49.


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