Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

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

Posted on 2006-11-22
4
Medium Priority
?
298 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 2000 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

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Question has a verified solution.

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

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…
If you are a web developer, you would be aware of the <iframe> tag in HTML. The <iframe> stands for inline frame and is used to embed another document within the current HTML document. The embedded document could be even another website.
In this video you will find out how to export Office 365 mailboxes using the built in eDiscovery tool. Bear in mind that although this method might be useful in some cases, using PST files as Office 365 backup is troublesome in a long run (more on t…
Is your data getting by on basic protection measures? In today’s climate of debilitating malware and ransomware—like WannaCry—that may not be enough. You need to establish more than basics, like a recovery plan that protects both data and endpoints.…
Suggested Courses
Course of the Month8 days, 12 hours left to enroll

598 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