html - .htaccess mod_rewrite.c removing php extension not working on godaddy servers -


i have seen problem posed on several sites solution, doesn't seem working me.

i trying turn somesite.com/services.php somesite.com/services

my .htaccess:

<ifmodule mod_rewrite.c> options -multiviews rewriteengine on rewritecond %{request_filename}.php -f rewritecond %{request_uri} !/$ rewriterule ^(.*)$ $1\.php </ifmodule> 

adding the

options -multiviews 

was peoples solution problem. didn't work me.

this creates issue when searching services.php file, looking in directory location after duplicating path .com

/somesite.com/somesite.com/services.php  requested url /somesite.com/somesite.com/services.php not found on server. 

i have feeling simple fix. hoping stackoverflow army can correct error.

thank you.

use this

<ifmodule mod_rewrite.c>      setenv http_mod_rewrite on     rewriteengine on     rewritebase /     rewritecond %{request_uri} ([^.]+).html$     rewriterule ^.* %1.php [l]  </ifmodule> 

and possible duplicate of htaccess not working on godaddy


Comments