Solved

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

Posted on 2006-11-22
4
293 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
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

Free learning courses: Active Directory Deep Dive

Get a firm grasp on your IT environment when you learn Active Directory best practices with Veeam! Watch all, or choose any amount, of this three-part webinar series to improve your skills. From the basics to virtualization and backup, we got you covered.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Apache 2.2 on Windows 2008 32 83
Problem to go to page 12 102
phpPgAdmin problem 14 196
$_SERVER Variable question 29 20
As Wikipedia explains 'robots.txt' as -- the robot exclusion standard, also known as the Robots Exclusion Protocol or robots.txt protocol, is a convention to prevent cooperating web spiders and other web robots from accessing all or part of a websit…
It is possible to boost certain documents at query time in Solr. Query time boosting can be a powerful resource for finding the most relevant and "best" content. Of course the more information you index, the more fields you will be able to use for y…
Two types of users will appreciate AOMEI Backupper Pro: 1 - Those with PCIe drives (and haven't found cloning software that works on them). 2 - Those who want a fast clone of their boot drive (no re-boots needed) and it can clone your drive wh…

808 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