Google Answers Logo
View Question
 
Q: htaccess question ( No Answer,   0 Comments )
Question  
Subject: htaccess question
Category: Computers
Asked by: j_philipp-ga
List Price: $6.00
Posted: 19 Sep 2004 11:32 PDT
Expires: 19 Oct 2004 11:32 PDT
Question ID: 403335
In my htaccess file, how can I redirect index.html requests to the
folder (the root the htaccess is in) itself? I want something like a
permanent redirect status code. Thanks!

Request for Question Clarification by larre-ga on 19 Sep 2004 18:28 PDT
Have you tried simply:

Redirect 301 index.html http://www.domain.com/

?

---l

Clarification of Question by j_philipp-ga on 20 Sep 2004 00:57 PDT
Thanks Larre. I didn't try that before (you can see I'm a beginner at
this and the answer to my question must not necessarily be tough).
I did try now (Redirect 301 index.html http://www.domain.com/) and
nothing happened.
Note that in my file there's some stuff already, so I'd need to know
where to put it (for your sample, I put it in several places with no
result)...

RewriteEngine on
Options +FollowSymlinks
RewriteBase /
RewriteRule ^citybrowser/(.*)-in-(.*).html  citybrowser/?keyword=$1&lang=$2
... and some more lines like the last one ...

The htaccess file is in the root of the subdomain.
Philipp

Request for Question Clarification by larre-ga on 20 Sep 2004 16:07 PDT
Try this version:

Redirect permanent /index.html http://www.domain.com/

Adding the / in front of the path should make it work properly,
however, it may also have the same effect on folders "below" the root
that also have an index.html file. You may need to add additional
lines -below- this redirect to ensure index.html files for the domain
go to the proper directory. For example:

Redirect permanent /foldername/index.html http://www.yourdomain.com/foldername/

You can give it a try and see. How into this do you want to go? If you
have root access, I can provide you server commands (mod rewrite) that
will also work.

Clarification of Question by j_philipp-ga on 11 Oct 2004 10:54 PDT
Sorry, this doesn't work for me. I get a "URL redirect exceeded"
message. I guess it will start a loop because index.html is also the
default file on my server. I used
Redirect permanent /index.html http://blog.outer-court.com

Thanks anyway, Larre!
Answer  
There is no answer at this time.

Comments  
There are no comments at this time.

Important Disclaimer: Answers and comments provided on Google Answers are general information, and are not intended to substitute for informed professional medical, psychiatric, psychological, tax, legal, investment, accounting, or other professional advice. Google does not endorse, and expressly disclaims liability for any product, manufacturer, distributor, service or service provider mentioned or any opinion expressed in answers or comments. Please read carefully the Google Answers Terms of Service.

If you feel that you have found inappropriate content, please let us know by emailing us at answers-support@google.com with the question ID listed above. Thank you.
Search Google Answers for
Google Answers  


Google Home - Answers FAQ - Terms of Service - Privacy Policy