Solved

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

Posted on 2006-11-22
4
290 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
Comment Utility
Try

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

Author Comment

by:Caiapfas
Comment Utility
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
Comment Utility
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
Comment Utility
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

Get up to 2TB FREE CLOUD per backup license!

An exclusive Black Friday offer just for Expert Exchange audience! Buy any of our top-rated backup solutions & get up to 2TB free cloud per system! Perform local & cloud backup in the same step, and restore instantly—anytime, anywhere. Grab this deal now before it disappears!

Join & Write a Comment

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…
Over the last year I have answered a couple of basic URL rewriting questions several times so I thought I might as well have a stab at: explaining the basics, providing a few useful links and consolidating some of the most common queries into a sing…
Internet Business Fax to Email Made Easy - With eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…
This video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're looking for how to monitor bandwidth using netflow or packet s…

763 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

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now