Re-routing a URL

Status
Not open for further replies.

tonylundervold90

New Member
Messages
11
Reaction score
0
Points
0
What code needs to be added to my webpage to reroute an old url with an additional extension? The problem is as follows: the old url is www.joniharms.com/home.cfm when a user tries to view the site from their original bookmarked link they get a 404 error message because the actual url is: www.joniharms.com I was told I have to edit the coding to fix this....any suggestions???
 

descalzo

Grim Squeaker
Community Support
Messages
9,373
Reaction score
326
Points
83
Add to .htaccess file:

Code:
Redirect  301 /home.cfm  /index.php

assuming your replacement for home.cfm is index.php
 

tonylundervold90

New Member
Messages
11
Reaction score
0
Points
0
It is index.html.......I have not created a .htaccess file

---------- Post added at 05:38 PM ---------- Previous post was at 05:34 PM ----------

I have learned much about PHP
 

descalzo

Grim Squeaker
Community Support
Messages
9,373
Reaction score
326
Points
83
cPanel --> (bottom of page) reset all interface settings click on it

now go to File Manager and when the dialog comes up, check the "show hidden files" and "do not show again"

that way you can see .htaccess

If it is not there, create it. Add the line, using index.html instead of index.php
 

tonylundervold90

New Member
Messages
11
Reaction score
0
Points
0
is the following case sensitive? Or does it go into the file as is? any other code required?

Redirect 301 /home.cfm /index.php

---------- Post added at 06:02 PM ---------- Previous post was at 05:56 PM ----------

Ok I went ahead and tried it and it worked great! Thank you so much for your help with this matter!!!
 

calistoy

Free Support Volunteer
Community Support
Messages
5,602
Reaction score
87
Points
48
To answer your question, yes. All file and directory names are case sensitive because these servers use linux.
 
Status
Not open for further replies.
Top