I am using Drupal 7. When you type the website url: www.exampleCountry.com, it gets redirected to www.example.com. Now, I need to change the www.example.com to www.example.com/country/countryName/.

Will changing this:

RewriteCond %{HTTP_HOST} ^DomainA.com
RewriteRule ^(.*) http://DomainB.com/$1 [P] 

in the .htaccess file help?

Can you please help me with the same?

  • make any change in .htaccess file, you need to restart server. Try to restart server. – Nishant Dec 12 '14 at 11:53
  • 1
    @NishantP Really? Are you sure about that!! I don't think so. As far as I know, restart is not required for changes to .htaccess – Krishna Mohan Dec 12 '14 at 11:59
  • Many times whenever I made changes on .htaccess without restart server am not got any reflection. So I just suggest, nothing else. – Nishant Dec 12 '14 at 12:21
  • 2
    The point of .htaccess is that it's parsed per request - restarting the server after changing .htaccess will have no effect – Clive Dec 12 '14 at 13:10
  • But will making the above change in the .htaccess file serve my purpose? – newbie1985 Dec 13 '14 at 6:31

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.