hello ive been trying to get my .htaccess file working but nothings doing the trick. here is the code that i am using.

RewriteEngine on 
RewriteCond %{REQUEST_FILENAME} !-d 
RewriteCond %{REQUEST_FILENAME}\.php -f 
RewriteRule ^(.*)$ $1.php

Recommended Answers

I'm not very .htaccess litterate either just so you know.
So is what you're trying to do just not working? Or is it giving an error? (usually a 500 error)
The answer is dependent on that, several different things could be the problem.

Jump to Post

Are you trying this on your server, or on a development machine?

Jump to Post

All 6 Replies

ok so i looked at that and compared my code, and didnt see any issue besides the fact that im missing rewrite base /, also i looked up more about htaccess and found out the code im using is used for wordpress, when im not using wordpress, so my new question is what do i have to change to get this working.

note: im verry new to htaccess and just found the code above online

I'm not very .htaccess litterate either just so you know.
So is what you're trying to do just not working? Or is it giving an error? (usually a 500 error)
The answer is dependent on that, several different things could be the problem.

Well its just not doing anything, no error no nothing.

Im doing this on vps server

Be a part of the DaniWeb community

We're a friendly, industry-focused community of 1.20 million developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.