0

Is it still considered to be an OK practice to use htaccess to render PHP in HTML files for things like a navigation/menu?

I used to do it back in the day for smaller sites that didn't really need a CMS, but I wasn't sure if it's a faux pas these days.

1 Answer 1

2

It's purely up to you. It doesn't pose any threat to your site or expose any vulnerability so it doesn't matter either way. Rendering a PHP file with an HTML extension is no different than one with a PHP extension.

In fact, if you're migrating a static site to dynamic one, it's actually a good way to preserve page URLs.

Sign up to request clarification or add additional context in comments.

1 Comment

Cool, thanks! Yeah, I just wasn't sure since I know security and scripts have come along way and if was an issue on the security end or if was just an old practice. Thanks for the feed back!

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.