Jump to content

Htaccess Question

Recommended Posts

I'm redoing a site for an organization I volunteer for and I'm changing to php pages from html pages (adding functionality). I'm fairly certain I need to use a .htaccess file to reroute the .htm pages to .php. E.g contact.htm needs to forward on to contact.php. Does anyone have any good advice on the best methods to do this? If it's a .htaccess file, can you suggest the correct code to go in it?



Link to comment
Share on other sites

You can use CPanel to setup redirects too but that is not as easy as what Bruce shows.


If you replace your html files (delete them) with php files (upload them) your site will use the new php files without the redirects...AS long as you change all the site navigation links on your pages and menus. (Your menu links will be to contact.php instead of contact.html for example as you said)


If your site has been up for awhile the redirects will help convert external links to your site.

Edited by Kevan
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...