0
我有一个链接:http://testsite.com/api/v2/1 我想我的浏览器指向:1.testsite.com和使用的.htaccess链接重定向它到这个地方:http://testsite.com/api/v2/1htacces URL重写重定向
我该怎么做?
我有一个链接:http://testsite.com/api/v2/1 我想我的浏览器指向:1.testsite.com和使用的.htaccess链接重定向它到这个地方:http://testsite.com/api/v2/1htacces URL重写重定向
我该怎么做?
试试这个:
RewriteEngine On
RewriteCond %{HTTP_HOST} ^(.+)\.testsite\.com$ [NC]
RewriteRule ^$ http://testsite.com/api/v2/%1 [L]
我已经在我的.htaccess这些记录:的RewriteCond%{} REQUEST_FILENAME -f 重写规则^的index.php [QSA,L]! – user889349