0

my joomla url is :

http://sitename.com/index.php/search/door?slug=101-jessica-alba-202

and make it to url like :

http://10-jessica-alba-194.sitename.com/

so what is the .htaccess rule for this. ??

i tried

 RewriteCond %{HTTP_HOST} ^(([0-9]+)-(.*)-([0-9]+))\.sitename\.com$

 RewriteRule ^$ index.php?option=com_name&view=viewname&slug=%1
Dhaval
  • 11
  • 1
  • What happened with what you tried? It doesn't work? How? Have you checked your error logs? – Jon Lin Feb 09 '15 at 07:26
  • have you referred this ? https://docs.joomla.org/Enabling_Search_Engine_Friendly_%28SEF%29_URLs – SagarPPanchal Feb 09 '15 at 08:37
  • i referred that, but i want virtual subdomain like http://101-jessica-alba-202.sitename.com/ for this url http://sitename.com/index.php/search/door?slug=101-jessica-alba-202 – Dhaval Feb 09 '15 at 09:09
  • "Does not work" can mean a million different things, without some investigation on your part, there's not much that can be done except random trial and error. I guess you don't get any error messages anywhere, either? – Jon Lin Feb 09 '15 at 15:03

1 Answers1

0

There are multiple steps that need to be done in order to accomplish what you want:

  • You will need to enable wildcard subdomains on your domain (this can be done via cPanel)
  • You will need to modify the appropriate router file to parse the first part of the URL (and not the last part).
  • You will need to add the appropriate entries in the .htaccess file.

So, it's just not only an .htaccess modification that will do what you want.

itoctopus
  • 4,133
  • 4
  • 32
  • 44