Score:0

Apache Wildcard Directory Use Alias File

vn flag

I am trying to achieve the following:

All searches at https://example.com/a/* will display file article.php.

For example (links to articles):

https://example.com/a/new-robot-eats-banana 
https://example.com/a/best-shoes-for-mud
https://example.com/a/its-about-time-we-move-to-mars

Will use article.php

echo basename($_SERVER['PHP_SELF']);

Example:

https://example.com/a/new-robot-eats-banana

new-robot-eats-banana

While keeping the url the same.

Is this done using alias?

Alias /a/* article.php
uz flag
see: [Apache rewrite URL if accessed in specific directory](https://serverfault.com/questions/94736/apache-rewrite-url-if-accessed-in-specific-directory)
ezra-s avatar
ru flag
Have you tried something like `<Location /a>FallbackResource /path/to/article.php</Location>` Note this path starts from documentroot not from root filesystem.
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.