2013-05-20 56 views
0

創建短網址腳本 當我使用我的腳本與任何子域名[如http://s.yourdomain.com]然後.htaccess將無法正常工作,但腳本在其他位置工作正常yourdomain.com/sh/重寫.htaccess代碼工作與子域

這裏的代碼,我寫的.htaccess

RewriteEngine on 
RewriteCond %{REQUEST_FILENAME} !-d 
RewriteCond %{REQUEST_FILENAME}\.php -f 
RewriteRule ^(.*)$ $1.php 
RewriteRule ^([a-zA-Z0-9]+)$ index.php?short=$1 
ErrorDocument 404 /index.php 

想,關於子域名也 工作,做上述功能的.htaccess代碼

回答

0
RewriteRule^http://s.yourdomain.com 

在這裏,您將通過您的子域名與我們在移動網站上重定向網址時相同。 http://m.yourdomain.com

+0

它不會工作它去無限重定向 –