I am at a loss, have tried .htaccess which seems to only work on my server, when uploaded to my hosting account, nothing but a big 404 error; I did more research and learned about web.config for godaddy users, still nothing. I am new at using this method, tried numerous rewrite codes, changing the extensions, researching, you name it. Maybe I'm not understanding exactly how to place the files when uploading; I did read threads on here and still I'm missing something.
this is the objective: site.com/index.php to site.com/index
here are examples of what i used to accomplish my goal .htaccess:
Options -MultiViews
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^([^\.]+)$ $1.php [NC,L]
#Fix Rewrite
Options -MultiViews
# Mod Rewrite
Options +FollowSymLinks
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^([^\.]+)$ $1.php [NC,L]
web.config:
<configuration>
<system.webServer>
<rewrite>
<rules>
<rule name="RewritePHP"> <match url="(.*)" />
<conditions logicalGrouping="MatchAll">
<add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" />
<add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" />
</conditions> <action type="Rewrite" url="{R:1}.php" /> </rule>
</rules>
</rewrite>
</system.webServer>
</configuration>