0

I've been using the same .htaccess file to remove the .php extension in my sites. I can't seem to figure out what doesn't work this time. Its a new hosting provider I registered with.I tried making a simple redirect to SO to see if the file was getting parsed,It does. I read the whole Apache Mod_rewrite book and understand what the file does but there's something I'm missing.Thanks in advance for the help.here's the file:

RewriteEngine On
RewriteCond %{REQUEST_FILENAME} -f [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteBase /
RewriteRule ^(.+) - [PT,L]
RewriteRule ^(.+) index.php [L]

Btw It's in the public_html folder which shouldn't make a difference.

fbstj
  • 1,684
  • 1
  • 16
  • 22
seb
  • 1
  • 1
  • 2
  • Just found the solution to my problem.I m using this now: – seb May 24 '11 at 22:05
  • RewriteEngine On RewriteBase / RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_FILENAME}\.php -f RewriteRule ^(.*)$ $1.php RewriteRule ^index\.php$ / [R=301,L] – seb May 24 '11 at 22:05

1 Answers1

0
Options +FollowSymLinks
RewriteEngine on
RewriteBase /

RewriteRule ^page-name\.html$ page-name.php [T=application/x-httpd-php,L]
Justin Levene
  • 1,630
  • 19
  • 17