I am trying to change the URL of a Joomla site in browser my original URL is like


and I want to change it to


I am using following code in Htaccess file

RewriteEngine On
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
RewriteCond %{REQUEST_URI} !^/index\.php
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^marketsite/([^/]+)/?$ http://$1.%{HTTP_HOST}/marketsite

It is redirecting the site to subdomain and changing the URL but site is not not working now which was working on

  • 1
    "URL masking" - as you have found, you can't easily "mask" the URL when changing the domain, mod_rewrite will naturally trigger an external redirection - but I assume this is what you want to do anyway? Is the site configured to work on the subdomain? – MrWhite Oct 26 '15 at 10:02
  • 1
    Define "not working". – MrWhite Oct 26 '15 at 10:36

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.