Forums Trac

.htaccess forwarding in the /apache2/htdocs directory?

Subscribe to .htaccess forwarding in the /apache2/htdocs directory? 8 post(s), 3 voice(s)

 
Avatar kamko 7 post(s)

Hello,

Hopefully from what I did so far, this doesn’t come off as a newbie question. I did look at another user’s post in the forum on htaccess config with joomla [1] that I thought was useful but perhaps someone can provide some insight here:

Steps so far:

I created an .htaccess file in the /apache2/htdocs directory to redirect. it had this instruction only:

Redirect /index.html http://domain.com/trac/our_proj

That by itself didn’t work.

I found in the httpd.conf file that AllowOverride was set to “AllowOverride None” so i changed it to:
AllowOverride All

still didn’t work.

Are there any are additional settings anywhere that I need to modify for .htaccess files to work?

[1] http://bitnami.org/forums/forums/3/topics/741 – I want to get some guidance before I start messing around more with the comments in this thread so that I know I’m on the right track and doing the steps to get this to work…

 
Avatar antonio 621 post(s)

Hi,

Have you checked that the module is not commented out of the httpd.conf file? That has happened in the past

 
Avatar kamko 7 post(s)

Antonio,

thanks for responding.

Which module are we talking about? Hmm, The guy in the last post never got a chance to followup on the post.

Do I need to turn on mod_rewrite?

When I check the mod_rewrite doc at: http://httpd.apache.org/docs/1.3/mod/mod_rewrite.html

That website doesn’t mention specifically the ‘Redirect’ command in htaccess anywhere … it does talk about Rewrite rules a lot though, but I think I’m looking for info on Redirect.

 
Avatar antonio 621 post(s)

The Redirect command is from mod_alias, and I don’t know right now if it is enabled by default. The guy in the other post was talking about mod_rewrite, and his problem was that it was not enabled in the default installation, that’s why I was wondering if something similar may be happening.

 
Avatar kamko 7 post(s)

Ah, found the answer.

Here’s the step by step process to make the top level ”/apache2/htdocs directory” enable redirects via mod_alias (ie: a visit to index.html will be forwarded to another page due to an .htaccess file’s Redirect instruction).

I have tested this and this should work on a vanilla, just created, instance of the bitnami Trac stack. (PLEASE verify though)

Open the httpd.confg file and where the <directory /> </ Directory> command is, replace with either [note: if possible, please tell me which is better so we can update this thread!]

<Directory />
  Options FollowSymLinks 
  AllowOverride All
  Order deny,allow
  Deny from all
  Satisfy all
</Directory>

Or:

<Directory />
   Options All
   AllowOverride All
</Directory>

Also, under :

<Directory "/home/falconviewuserssh/trac-0.10.4-9/apache2/htdocs">

update the AllowOverride attribute, from:

  AllowOverride None 

to:

    AllowOverride All 

Finally: make an .htaccess file and give it the following instruction:

Redirect /index.html http://domain.com/trac/our_proj

Please reply back if you had a chance to verify the instructions above. Thanks!

 
Avatar antonio 621 post(s)

Thanks for the detailed guide kamko. Unfortunately, I am not able to test it right now, but it looks good to me!

 
Avatar kamko 7 post(s)

Your welcome antonio! I’m glad to help: i’m sure I’m not the only one with this question and i’m glad to help the bitnami community.

I read in the main forum that you’re transitioning from bitnami forum support. Perhaps I can help with bitnami.

Can you private message me as well, or have the your colleague message me. Or send me an email at the address I registered with for the forums. I’d like to ask a followup question on this thread on how I can help however I need some input on it over email before I just go ahead and post away.

Thanks, and your help has really been valuable. I’ve learned so much from your posts.

 
Avatar okkare 16 post(s)

This didn’t fix the problem for me, and I think it has something to do with Ubuntu.

Forums Trac