Rewrite except for single uri

Edward Stow ed.stow at
Mon Aug 3 08:45:05 MSD 2009


I have a small site that has a buy page with ssl :

I want all requests to other pages to be re-directed to http such as  --> http://abc.tld/index.html passes through unchanged

I do not want to have explicitly list the other pages in the rewrite
as shown for obvious reasons.
The list has been edited down for brevity.

Any better suggestions.

	listen		443;
	ssl			on;
	ssl_certificate		/etc/ssl/certs/;
	ssl_certificate_key	/etc/ssl/private/;
	access_log		/var/log/nginx/abc.tld.access.log;
	location 	/
	#Must be a better way to rewrite
		rewrite		^/(index|about|contact|delivery|refund|privacy|credits)\.html$	http://abc.tld/$1.html
		root	/srv/www/abc.tld/html;
		index	buy.html;
		ssi		on;



More information about the nginx mailing list