开发者

url rewriting: I don't see index.html but a 404 error

开发者 https://www.devze.com 2023-03-30 08:06 出处:网络
I have the latest version of apache2 installed on my vm. I activated the mod_rewrite by doing: a2enmod rewrite

I have the latest version of apache2 installed on my vm.

I activated the mod_rewrite by doing:

a2enmod rewrite
/etc/init.d/apache2 restart

Now I just tested a little rule but it does not work. I have a .htaccess and an index.htmlon my website root. The .htaccess contains:

Options +FollowSymLinks
Options +Indexes
RewriteEngine On
RewriteBase /
RewriteRule ^index.bla$ index.html [L]

But when I go to my_vm_ip/index.bla I don't see index.html开发者_开发知识库 but a 404 error !


you probably meant ^index\.bla$ and if you go directly to my_vm_ip/index.html do you see the page? if not you probably are lacking the rights for the file

0

精彩评论

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