I’vee got the following htaccess file in /connect folder and I need to integrate this into an httpd.conf file (which has commands already):
/connect/.htaccess
SetEnv APPLICATION_ENV development
RewriteEngine On
RewriteBase /connect
RewriteCond %{REQUEST_FILENAME} -s [OR]
RewriteCond %{REQUEST_FILENAME} -l [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^.*$ - [NC,L]
RewriteRule ^.*$ index.php [NC,L]
httpd.conf
...
NameVirtualHost *:80
<VirtualHost *:80>
DocumentRoot /var/www/html/alter
ServerName www.mysite.com
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{HTTP_HOST} !^www\.
RewriteCond %{HTTPS}s ^on(s)|
RewriteRule ^ http%1://www.%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
...
....
I’m not sure how I can fit the above into the below?
A .htaccess is essentially the guts of a block in httpd.conf, so you’d want something like
Though, you should only make such a chance once you’re satisified that the .htaccess is working properly and will not be changed (much) anymore. Any changes to httpd.conf require you to bounce the server, while .htaccess changes take effect immediately for the next request.