2012-03-14 15 views
1

私は、次のいずれかのURLが呼び出されたときfile.php呼び出すようにApacheを必要とする:/file-contents.xml Apacheの設定でファイル名にワイルドカードエイリアスを使用するにはどうすればよいですか?

  • /file.xml
    • /file-abc.xml
    • /[ファイル] - Nの.xml
    • /file-xyz.xml

    は、ここに私のapacheのconfフィルからのサンプルですE:私はfile.xmlとファイルcontents.xmlがうまくfile.php呼び出すために取得することができます

    <VirtualHost *:80> 
        DocumentRoot /html 
        ServerName domain.com 
    
        UseCanonicalName Off 
    
        Alias /file.xml /html/file.php 
        Alias /file-contents.xml /html/file.php 
        Alias /file-*.xml /html/file.php 
    </VirtualHost> 
    

    (最後の行に2番目に重要なものです)。しかし、ワイルドカードは機能しません。

    お勧めですか?


    ANSWER:マルク・Bに

    ありがとう!

    AliasMatch ^/file-(.*).xml /html/file.php 
    
  • 答えて

    関連する問題