开发者

can't I rewrite URL on hosting when i don't have domain?

开发者 https://www.devze.com 2023-03-02 17:47 出处:网络
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 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.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号