redirect - nginx ignoring Apache rewrite directive -


my problem this: - use nginx in front of apache server wide meaning websites - rewrites have in .htaccess file work perfect, except 1 , far noone managed give me solution

this .htaccess rule

 -------------     rewritecond %{the_request} ^.*/index\.(html|htm)\ http/     rewriterule ^(.*)index\.(html|htm)$ http://%{http_host}/$1 [r=301,l]  ------------- 

this following: - redirects 301 http code www.domain.com/index.html www.domain.com - takes both index.html , index.htm

now thing worked prior installing nginx , works far index.htm.. redirects properly. index.htm not exist.

i tried other way around , found out if file exists, redirect won't happen.

another weird thing found following: have mod_pagespeed installed google , when access url www.domain.com/index.html... 1 not rewrite /, mod_pagespeed is... inactive.. meaning no changes occur in source instance....like url not same normal requests.

btw..in ssh when issue nginx command this:

nginx: [warn] duplicate mime type "text/html" in /etc/nginx/nginx.conf:30 nginx: [emerg] bind() 111.111.111.111:80 failed (98: address in use) nginx: [emerg] bind() 111.111.111.111:80 failed (98: address in use) nginx: [emerg] bind() 111.111.111.111:80 failed (98: address in use) nginx: [emerg] bind() 111.111.111.111:80 failed (98: address in use) nginx: [emerg] bind() 111.111.111.111:80 failed (98: address in use) nginx: [emerg] still not bind() 

111.111.111.111 - fake ip

i've looked duplicate mime.. can't find there , rest of bind stuff... not clue.

if guys have clue i'd happily share virtual mug of beer piece of info.

thanks

this might help.

rewritecond %{the_request} ^.*/index\.(html|htm)\ http/ [or] rewritecond %{request_filename} -f rewriterule ^(.*)index\.(html|htm)$ http://%{http_host}/$1 [r=301,l] 

Comments

Popular posts from this blog

c# - how to write client side events functions for the combobox items -

exception - Python, pyPdf OCR error: pyPdf.utils.PdfReadError: EOF marker not found -