Question

Applied cmd: ln -s subdir Edits to .htaccess: added this chunk between RewriteBase / and first RewriteCond line :

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} !=/favicon.ico
RewriteCond %{REQUEST_URI} ^/subdir
RewriteRule ^ subdir/index.php [L]

Loading the page (path e.g. www.example.com/subdir) gives 500 Internal Server Error. The log gives: Request exceeded the limit of 10 internal redirects due to probable configuration error. Use 'LimitInternalRecursion' to increase the limit if necessary. Use 'LogLevel debug' to get a backtrace. But I don't get it at all, where is it pulling that 10 redirects from?

The website is www.example.com and is running in one db (on Drupal). You can have multisites while running on same root install of CMS and database (but with prefixes). So the new website should open when visiting www.example.com/subdir (its FTP dir is htdocs/sites/example.com.recruiting) More infos: https://drupal.org/documentation/install/multi-site#subdirectory, but like I mentioned before, applying the .htaccess part ends up in internal server error.

Was it helpful?

Solution

Your conditions should mean rewrite if not already /subdir but it is doing reverse.

Try this:

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} !^/(subdir|favicon\.ico)
RewriteRule ^ subdir/index.php [L]
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top