1

Good day. I uploaded a file to my Ubuntu OS VPS (/var/www). The file's named 'theyu', without extensions. It's a php script, but for some reasons, I don't want to add the extension. I'd like to configure Apache to process a request such as say 10.382.234.32/theyu, where 10.382.234.32 is the vps' ip address, as 10.382.234.32/theyu.php

Is this possible? I'd really appreciate answers. I've tried editing the .htaccess file in /var/www using mod_rewrite, and the module is enabled in apache's configuration file. Allow OverWrite is also set to All at /etc/apache2/sites-available/default.

The command I used for rewriting in the .htaccess file was RewriteRule ^(theyu)$ /$1.php [L]

But all I get when I try acessing the it is a page not found error, cos it's processing theyu as a directory.

4

2 に答える 2

0

フォルダで MultiViews を有効にしていますか? 次に、それをtheyu.phpとして配置し、http: //example.com/theyuとしてリクエストできます

于 2013-08-28T14:18:47.657 に答える
0

そのため、MultiViews を有効にすることでこれを実現できました。Options +MultiViewshtaccess ファイルに追加します。うまくいきましたが、このソフトウェアで必要な機能を実現することはできませんでした。

于 2013-08-29T08:04:42.023 に答える