The only thing in http://localhost/.htaccess is this:
Options +FollowSymLinks
Alias /1 /2
…and I get an HTTP 500 error. Tried it with one, both, either or directories existing (e.g. localhost/1/). Not seeing anything for tutorials. Can I get this to work without modifying the server’s httpd.conf configuration file?
Goal: use a single (same) directory for two or more sites that are structured the same with different content.
Condition: This MUST be mirrored on a live server which means I do NOT have access to the server configuration.
If SymLinks can NOT be used in any way via .htaccess without modifying the server configuration then this approach is not one I can take.
According to the documentation, you cannot use
Aliasin a.htaccessfile.For the
Aliasdirective, it lists theContextasserver config, virtual host. If you were able to use it in a.htaccessfile then.htaccesswould appear in theContextfor the directive in the documentation.Some options to solve the problem:
/1a symlink to the/2directory. (Is/1already symlink to/2? If so, just get rid of theAliasstatement. You don’t need it in that case.)Aliasdirective to the server config.mod_rewriterules in your.htaccessfile. This will only work if your/2directory is under docroot.Redirectdirective. This also requires tht your/2directory is under your docroot. It’s different fromAlias, but it might be close enough for you depending on what it is you’re trying to achieve.