user5654245
user5654245

Reputation:

Redirect homepage to a different page using htaccess on a Drupal site

hoping you could give me some help. I'm trying to re-direct:

http://jaffajava.com/oldsite

To

http://jaffajava.com/oldsite/store

What I've tried so far:

  RewriteEngine on
  RewriteCond %{HTTP_HOST} ^jaffajava\.com/oldsite\$
  RewriteRule (.*) http://www.jaffajava.com/oldsite/store\$1 [R=301,L]

Any help on correcting my syntax/code?

Thanks!

Upvotes: 1

Views: 66

Answers (2)

MilanG
MilanG

Reputation: 7124

Why redirection? Just set new home page, in Configuration -> System -> Site information

Upvotes: 0

anubhava
anubhava

Reputation: 786329

HTTP_HOST variable only matches domain name in the request. You can use:

RewriteEngine on
RewriteCond %{HTTP_HOST} ^jaffajava\.com$ [NC]
RewriteRule ^oldsite(/.*)?$ http://www.jaffajava.com/oldsite/store$1 [R=301,L,NC]

Upvotes: 1

Related Questions