0

I am using the following code to remove the .html suffix and would like to exclude it for my /billing directory. How can I do this?

All the files in my /billing directory have the .php extension

RewriteRule ^([^\.]+)$ $1.html [NC,L]

1 Answers1

0

You can add a RewriteCond that excludes the rule in the billing directory:

RewriteCond %{REQUEST_URI} !^/billing/
RewriteRule ^([^\.]+)$ $1.html [NC,L]
yoavmatchulsky
  • 2,962
  • 1
  • 17
  • 22
  • What I have done on my .htaccess is `RewriteRule ^(.*) $1.html [L]` on rewrite rule where condition is similar as @yoavmatchulsky – San Thapa Mar 22 '15 at 10:59