0

I have htaccess files that use different RewriteBase on production and dev (windows) pc.

Currently I change the RewriteBase manually when deploying.

Can this be done automatically with some definition? The dev servers is windows 7 and production is Linux.

Here is an excerpt:

# !!! Change here between local host and production server!!!
# for local dev server
RewriteBase /app.xxx.com
# for production server
#RewriteBase /
Niro
  • 1,401
  • 4
  • 20
  • 36

1 Answers1

0

The best practice is to move your configuration directives to the actual Apache configuration file, and disallow .htaccess files completely.

That means you can simply copy all files from DEV to PROD without manual changes.

HBruijn
  • 77,029
  • 24
  • 135
  • 201