Results 1 to 5 of 5
September 2nd, 2005, 12:16 AM #1.htaccess redirect
I made some changes to filenames in a folder like so:
I want all users who visited an older link like so:
that no longer exists to go to:
What do I add to my .htaccess file in the root folder to make this happen. Currently, I have a 404 set so when there is no file, it goes to the 404. I want this redirect to only exists in /folder.
September 2nd, 2005, 04:36 AM #2
RewriteRule ^folder/file.html /folder/index.html [L]
September 2nd, 2005, 05:02 AM #3
hey thanks for the reply. Let me ask this with more info. Instead of pointing every file that no longer exists, can I set a global setting for this folder only? For instance, for this folder only, if file does not exists (ie. 404 error), redirect to the folder's index.html file. At the moment, my 404 redirect in the .htaccess file in the root folder is taking it to another 404 page.
Hope that made sense.
September 2nd, 2005, 06:03 PM #4
You could keep your 404 redirect in the .htaccess on the root of your server and put an other .htaccess in "/folder/" that override the one in the root folder.
So keep your .htaccess in the root for general 404 not found pages and put this one in the /folder/ you want:
ErrorDocument 404 /index.html
September 2nd, 2005, 07:39 PM #5
Thanks. I did try that before as you coded but mayeb my old school server is not setup properly. It even overode the root .htaccess file. But, when I put in the full URL, it works. Thanks for the tip!
By breeke in forum Programming / Datafeeds / ToolsReplies: 3Last Post: April 29th, 2010, 07:48 PM
By Kevin in forum Programming / Datafeeds / ToolsReplies: 2Last Post: December 5th, 2006, 10:09 AM
By ~Michelle in forum Midnight Cafe'Replies: 5Last Post: February 26th, 2006, 09:16 PM
By ~Michelle in forum Search Engine OptimizationReplies: 2Last Post: March 11th, 2005, 12:18 PM