Welcome to the Question2Answer Q&A. There's also a demo if you just want to try it out.
  • Register
Welcome to the Q&A for Question2Answer.

If you have questions about the platform, click here to ask and please use English.

If you just want to try Q2A, please use the demo, which also grants admin access.

Apr 29: Q2A 1.5.2

Equivalent to .htaccess in Apache config

0 votes
My hosting does not permit the use of .htaccess.  But I do have access to the vhost section for the site, and anything that can be done in .htaccess can be done in the configuration.  However, the commands are not exactly the same when used in the config as they are in .htaccess.

What commands are needed in the configuration to achieve the desired effect?
asked Nov 16, 2010 in Q2A Core by counterpoint

1 Answer

0 votes
I'm pretty sure the commands in the virtual host section are exactly the same as the htaccess ones. What errors are you getting?
answered Apr 8, 2011 by DisgruntledGoat
I'm afraid not.  There are tables of differences in the Apache manual at http://httpd.apache.org/docs/2.0/mod/mod_rewrite.html#rewriterule.  If the code is wrong, then the SEF links don't work.
I am pretty sure all you need to do is wrap the directives in a "Directory" clause in the httpd.conf. Something like:

<Directory /var/www/yoursite>
#all the htaccess directives here
</Directory>
Sorry, but that is just wrong.  Paths work differently between .htaccess and the Apache config.  This is well known and well documented.  But it isn't obvious how to change the redirects provided with Q&A to work in the config environment.  Please refer to the link provided earlier for more details.