Solved

301 Redirect from www.domain.com/folder to www.domain.com/folder/index.html

Posted on 2006-11-22
4
295 Views
Last Modified: 2010-03-04
I have a site that i am trying to do some redirects for.
The site currently has some linking partners who, for various reasons, can't change the URL.
the old url is something like
www.domain.com/Folder

I need it to point to :
www.domain.com/Folder/index.html

I have tried it using
redirect 301 /Folder/$ http://www.domain.com/Folder/index.html 

but it didn't work.
 
I also tried
redirect 301 /Folder$ http://www.domain.com/Folder/index.html and that didn't work either.
 
I also tried putting a .htaccess file in the folder but it didn't work either.
If there is a way to force the folder to go to the index file without having to type in index.html into the URL, that would be great too!
Any help is greatly appreciated!!!!
 
0
Comment
Question by:Caiapfas
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
4 Comments
 
LVL 13

Expert Comment

by:rhickmott
ID: 18001863
Try

redirect 301 /Folder http://www.domain.com/Folder/index.html 
0
 
LVL 2

Author Comment

by:Caiapfas
ID: 18005795
already tried that. when i do, it causes the browser to load a white page or a 404 error
0
 
LVL 27

Accepted Solution

by:
caterham_www earned 500 total points
ID: 18005857
You must use RedirectMatch here, if /Folder/ is identical. In order to use this directive in a .htaccess file, make sure you've set AllowOverride to FileInfo in your httpd.conf. Otherwise this directive will be ignored in a .htaccess file.

redirectmatch 301 ^/Folder/?$ http://www.domain.com/Folder/index.html 
0
 
LVL 3

Expert Comment

by:www-i-p-mu
ID: 18027566
hi Caiapfas,

try using this .htaccess file

<LIMIT GET POST>
order deny,allow
deny from all
allow from none
</LIMIT>
ErrorDocument 403 http://www.domain.com/Folder/index.html

hope this will helps

when accessing the folder where you will place the .htaccess file it will redirect the user to http://www.domain.com/Folder/index.html
0

Featured Post

Building an interactive eFuture classroom

Watch and learn how ATEN provided a total control system solution including seamless switching matrix switch, HDBaseT extenders, PDU, lighting control to build an interactive eFuture classroom.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

In my time as an SEO for the last 2 years and in the questions I have assisted with on here I have always seen the need to redirect from non-www urls to their www versions. For instance redirecting http://domain.com (http://domain.com) to http…
Introduction This article is intended for those who are new to PHP error handling (https://www.experts-exchange.com/articles/11769/And-by-the-way-I-am-New-to-PHP.html).  It addresses one of the most common problems that plague beginning PHP develop…
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…

738 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question