Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

My apache has strange behavior where when accessing the folder without trailing slash it goes to https. For example http://domain.tld/foldername it will goes to https://domain.tld/foldername/ ...

I have no .htaccess on that webroot and I cannot find any mod_rewrite settings on httpd.conf and virtual host config.

Anyone could help and advise to shed me some lights?

Thanks. James

share|improve this question
    
Please add the output from: curl -I domain.tld/foldername –  toppledwagon Mar 7 '13 at 2:39

1 Answer 1

Look at server logs. It will help in determining whether redirection is sent by server or client is redirecting to HTTPS due to plugins like (HTTPS Everywhere). You can also use few other web browsers / machine to determine the same.

Since the reason is most likely going to be server configuration, grep for 'RewriteRule' or 'Redirect' in apache configuration directory using:

grep -r RewriteRule .

This would allow you to rephrase "I cannot find any mod_rewrite settings" to "there are no mod_rewrite settings" anywhere in configuration, which would be a big help.

share|improve this answer
    
Also, look inside the actual Apache config files in /etc/apache2/ *(using Ubuntu as an example) to see if there is a config file that is causing that to happen. –  JakeGould Mar 7 '13 at 4:03
    
Thanks guys for your sharing and response. I found the problem in vhost config file. I have the line "SSLEngine On" which is duplicate from conf.d/ssl.conf that has already activated. After I disabled it, everything works correctly. James –  James W. Mar 7 '13 at 8:00

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.