can't I rewrite URL on hosting when i don't have domain?
I can rewrite URL in .htaccess in previous shared hosting. Today, i tranfer to new hosting. I don't have domain and i access to alternate domain ( hosting provide ) , but can't when use Rewriterule. I ask a supporter and they answer:
I can't rewrite URL on hosting when i don't have domain . Are they right ?
开发者_开发问答htaccess in public_html :
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteRule ^$ webroot/ [L]
RewriteRule (.*) webroot/$1 [L]
</IfModule>
htaccess in webroot:
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ index.php?url=$1 [QSA,L]
</IfModule>
There is no technical reason why a rewrite rule needs to be related in anyway to a domain.
It is possible the hosting service has grades of accounts in which access to mod_rewrite and domain names arrive at the same grade.
精彩评论