Jump to content

use mod_rewrite to setup a redirect


mallen

Recommended Posts

I changed my pages from .htm and .cfm to PHP. I am creating a .htaccess file using mod_rewrite.

 

1. Is this all I need? Will it direct users from a .htm page over to a php page or is it just for search engines?

 

2. What if my original page was called default.htm and now I amusing index.php

 

Options +FollowSymLinks

RewriteEngine on

RewriteRule ^(.*).htm$ $1.php [R=permanent,L]

RewriteRule ^(.*).cfm$ $1.php [R=permanent,L]

Link to comment
https://forums.phpfreaks.com/topic/152574-use-mod_rewrite-to-setup-a-redirect/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.