URL中的Joomla与htaccess的重写重写、URL、Joomla、htaccess

由网友(弃疗)分享简介:我的Joomla的网址是:的http://sitename.com/index.php/search/door?slug=101-jessica-alba-202和使其URL如:的http:// 10 - 杰西卡 - 阿尔巴-194 .sitename.com / 那么,什么是这个的.htaccess规则。 ??...

我的Joomla的网址是:

  

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

和使其URL如:

  

的http:// 10 - 杰西卡 - 阿尔巴-194 .sitename.com /

那么,什么是这个的.htaccess规则。 ??

我试图

 的RewriteCond%{HTTP_HOST} ^(([0-9] +) - (*) - ([0-9] +))。网站名称 .COM $

 重写规则^ $的index.php选项= com_name和放大器;查看=视图名和放大器;塞=%1
 

解决方案 IIS Url重写及配置

有需要按顺序执行多个步骤来完成你想要的:

您需要在您的域名启用通配符子域(这可以通过的cPanel做) 您将需要修改相应的路由器文件解析URL的第一部分(而不是最后一部分)。 您将需要添加相应的条目中的.htaccess文件。

所以,它只是不只是一个.htaccess的修改,将你想要做什么。

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

解决方案

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.

阅读全文

相关推荐

最新文章