url rewriting in joomla with htaccess

。_饼干妹妹 提交于 2019-12-12 05:49:41

问题


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

回答1:


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.



来源:https://stackoverflow.com/questions/28404600/url-rewriting-in-joomla-with-htaccess

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!