如何为子域创建htaccess

时间:2013-03-25 19:26:20

标签: .htaccess codeigniter

我在domain.com中有subdomain.domain.com,当我在浏览器中键入subdomain.domain.com,并且写了http://subdomain.domain.com/%20//subdomain.domain.com的URL并且我有.htaccess像这样:

    RewriteEngine on
RewriteBase /
RewriteCond %{REQUEST_URI} ^system.*
RewriteRule ^(.*)$ www.jubelmart.com/index.php/$1 [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php/$1 [L]

我可以帮忙吗?

1 个答案:

答案 0 :(得分:0)

enter code here我会试试这个:

RewriteEngine On
RewriteBase /%20//subdomain.domain.com
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ /%20//subdomain.domain.com/index.php/$1 [L]

确保/20%// uri细分是否正确?我真的不认为使用双斜线是一种很好的做法//