Skip to main content
added 39 characters in body; edited title
Source Link
Starx
  • 111
  • 4

Drupal site redirected Multiple sites routed to subdirectory through htaccessone codebase has the subdirectory name as prefix on the links

I am redirecting thetrying to redirect multiple drupal site into a subdirectorysites to same code base using following htaccess file

RewriteEngine on
RewriteCond %{HTTP_HOST} ^(www.)?site.com$ [NC]
RewriteCond %{REQUEST_URI} !^/subdirectory/
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ subdirectory/$1
RewriteCond %{HTTP_HOST} ^(www.)?ngeneric.com$ [NC]
RewriteRule ^(/)?$ subdirectory/index.php [L]

ButIt workds but, now every urlURL on the site has been rewrote to:its subdirectory infront like

http://site.com/**subdirectory**/.....

How to fix this?

More Info: Domain is routed to public_html/a/ The drupal site in inside this a directory as public_html/a/b and I am trying to use multiple sites, so I am getting this problem.

Drupal site redirected to subdirectory through htaccess has the subdirectory name as prefix on the links

I am redirecting the drupal site into a subdirectory using following htaccess

RewriteEngine on
RewriteCond %{HTTP_HOST} ^(www.)?site.com$ [NC]
RewriteCond %{REQUEST_URI} !^/subdirectory/
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ subdirectory/$1
RewriteCond %{HTTP_HOST} ^(www.)?ngeneric.com$ [NC]
RewriteRule ^(/)?$ subdirectory/index.php [L]

But, now every url on the site has been rewrote to:

http://site.com/**subdirectory**/.....

How to fix this?

More Info: Domain is routed to public_html/a/ The drupal site in inside this a directory as public_html/a/b and I am trying to use multiple sites, so I am getting this problem.

Multiple sites routed to one codebase has the subdirectory name as prefix on the links

I am trying to redirect multiple drupal sites to same code base using following htaccess file

RewriteEngine on
RewriteCond %{HTTP_HOST} ^(www.)?site.com$ [NC]
RewriteCond %{REQUEST_URI} !^/subdirectory/
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ subdirectory/$1
RewriteCond %{HTTP_HOST} ^(www.)?ngeneric.com$ [NC]
RewriteRule ^(/)?$ subdirectory/index.php [L]

It workds but, now every URL on the site has its subdirectory infront like

http://site.com/**subdirectory**/.....

How to fix this?

More Info: Domain is routed to public_html/a/ The drupal site in inside this a directory as public_html/a/b and I am trying to use multiple sites, so I am getting this problem.

added 190 characters in body
Source Link
Starx
  • 111
  • 4

I am redirecting the drupal site into a subdirectory using following htaccess

RewriteEngine on
RewriteCond %{HTTP_HOST} ^(www.)?site.com$ [NC]
RewriteCond %{REQUEST_URI} !^/subdirectory/
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ subdirectory/$1
RewriteCond %{HTTP_HOST} ^(www.)?ngeneric.com$ [NC]
RewriteRule ^(/)?$ subdirectory/index.php [L]

But, now every url on the site has been rewrote to:

http://site.com/**subdirectory**/.....

How to fix this?

More Info: Domain is routed to public_html/a/ The drupal site in inside this a directory as public_html/a/b and I am trying to use multiple sites, so I am getting this problem.

I am redirecting the drupal site into a subdirectory using following htaccess

RewriteEngine on
RewriteCond %{HTTP_HOST} ^(www.)?site.com$ [NC]
RewriteCond %{REQUEST_URI} !^/subdirectory/
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ subdirectory/$1
RewriteCond %{HTTP_HOST} ^(www.)?ngeneric.com$ [NC]
RewriteRule ^(/)?$ subdirectory/index.php [L]

But, now every url on the site has been rewrote to:

http://site.com/**subdirectory**/.....

How to fix this?

I am redirecting the drupal site into a subdirectory using following htaccess

RewriteEngine on
RewriteCond %{HTTP_HOST} ^(www.)?site.com$ [NC]
RewriteCond %{REQUEST_URI} !^/subdirectory/
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ subdirectory/$1
RewriteCond %{HTTP_HOST} ^(www.)?ngeneric.com$ [NC]
RewriteRule ^(/)?$ subdirectory/index.php [L]

But, now every url on the site has been rewrote to:

http://site.com/**subdirectory**/.....

How to fix this?

More Info: Domain is routed to public_html/a/ The drupal site in inside this a directory as public_html/a/b and I am trying to use multiple sites, so I am getting this problem.

Source Link
Starx
  • 111
  • 4

Drupal site redirected to subdirectory through htaccess has the subdirectory name as prefix on the links

I am redirecting the drupal site into a subdirectory using following htaccess

RewriteEngine on
RewriteCond %{HTTP_HOST} ^(www.)?site.com$ [NC]
RewriteCond %{REQUEST_URI} !^/subdirectory/
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ subdirectory/$1
RewriteCond %{HTTP_HOST} ^(www.)?ngeneric.com$ [NC]
RewriteRule ^(/)?$ subdirectory/index.php [L]

But, now every url on the site has been rewrote to:

http://site.com/**subdirectory**/.....

How to fix this?