Questions tagged [mod-alias]
Maps different parts of a host file system into the document tree and it used for URL redirection
66 questions
1
vote
1
answer
36
views
Apache web server: Is it possible to pass arguments to ScriptAlias scripts?
Due to various environmental complexities which are not relevant to the question, I need to launch PHP via a batch file (Windows) and so have set up a ScriptAlias, which looks something like this:
...
1
vote
1
answer
267
views
Apache AliasMatch with Multiple Subdomains
I have the following virtual hosts:
<VirtualHost *:443>
ServerName article.example.com
AliasMatch "^/(.*)" "/var/www/html/article.php"
</VirtualHost>
<...
0
votes
1
answer
406
views
Apache AliasMatch with Wildcard Not Working As Intended
I am trying map all wildcards for a directory /a/* onto on file article.php using AliasMatch ^/a/(.*) /article.php but without redirecting (I want to keep the url looking the same). But I am getting a ...
1
vote
1
answer
948
views
Apache RedirectMatch not matching double slash
I want to redirect URLs with multiple consecutive slashes (e.g. //) in the path to have only one consecutive slash, e.g.
https://example.com/a//b/c/ → https://example.com/a/b/c/.
My .htaccess file ...
1
vote
1
answer
977
views
How to create alias to url in Apache 2
I have main url like http://apps1.example.com and i want create alias like
http://apps1.example.com/svc-base
in my vhost config
<VirtualHost *:80>
ServerName apps1.example.com
...
2
votes
1
answer
231
views
Redirect French homepage (and only FR home page) to English home page
Using the .htaccess file, I would like to redirect www.example.com/fr/ to www.example.com/ but not other French pages that have the /fr/ root (e.g. www.example.com/fr/page-name)
I've tried using ...
1
vote
1
answer
166
views
2 websites hosted on same domain, 1 needs to look like a subfolder ( /blog)
I bought a VPS for my new project running apache.
On it I have 2 websites on the same domain.
The first one is Ruby on Rails /var/www/html
The second one is Wordpress /var/www/blog
I want Wordpress to ...
2
votes
1
answer
920
views
Apache Web Server Aliasing for multiple url giving 404
I am trying to redirect the all the URL starting from /search-engine/* to /var/www/search-engine/dist but the result says not found, I had tried with AliasMatch as shown below
AliasMatch ^/search-...
0
votes
1
answer
743
views
How does Apache order the evaluation of Alias and ScriptAlias?
Under mod_alias, how does Apache order Alias and ScriptAlias directives with respect to each other?
The mod_alias docs say
The ScriptAlias directive has the same behavior as the Alias directive, ...
1
vote
1
answer
3k
views
Remove leading slash in URLs - Apache
I've been trying to remove the trailing slashes from all URLs. For example, I want the following URLs to redirect:
http://example.com///test -> http://example.com/test
http://example.com//test -&...
1
vote
1
answer
669
views
Use Path Info in conjunction with RewriteRule
I have a legacy application that I want to wrap in a new symfony project. In order to separate things clearly I decided to move the entire legacy application into a folder legacy which lies outside ...
2
votes
2
answers
4k
views
Apache 2.4: mod_alias, mod_rewrite, mod_proxy execution order
I can't find any documentation on Apache vhosts instructions priority / execution order between
mod_alias (Redirect instructions),
mod_rewrite (RewriteRule instructions)
mod_proxy (ProxyPass ...
1
vote
1
answer
10k
views
How to redirect from one subfolder to a subsubfolder with htaccess
I have this folder structure:
/fonts
/myfont.eot
/myfont.svg
/myfont.ttf
/myfont.woff
/myfont.woff2
/content
/page1
/files
/logo.png
/style.css
/index.html
/page2
...
1
vote
1
answer
920
views
I want to add Apache Alias for api (Different users)
First of all i'm a beginner on these issues, sorry for this :) Actually i am a software developer.
I have a project. Many domains connect to Rest Api domain. And all domains locate same server. I ...
0
votes
1
answer
525
views
How to add the trailing slash in general for an Apache + CDN architecture (without using Apache mod_rewrite)?
I would like to add the trailing slash in general when it is absent in the request URL:
when user requests https://example.com/blog, it should be redirected to https://example.com/blog/
when user ...