Maps different parts of a host file system into the document tree and it used for URL redirection
Questions tagged [mod-alias]
65 questions
2
votes
1 answer
Apache: Serving same file on multiple vhosts using regex
I have various virtual hosts (vhosts) setup on an Apache 2.2 server such as:
examplea.domain
exampleb.domain
testsitea.domain
testsiteb.domain
testsite.domain
othersitea.domain
On virtual hosts matching the regular expression "site[a-z].domain", I…

Richy B.
- 213
- 1
- 6
2
votes
1 answer
Redirect an Apache2 SSL VirtualHost with mod_alias
I want to make sure there aren't any mysterious odd behaviors when redirecting a SSL VirtualHost with mod_alias Redirect as outlined by Apache here.
My code seems to work, but since SSL virtual hosts are restricted to just one IP address, I want to…

Jeff
- 1,416
- 3
- 28
- 50
2
votes
1 answer
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-engine(.*) /var/www/search-engine/dist
Front-End…

Prashobh K V
- 29
- 1
1
vote
1 answer
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 -> http://example.com/test
http://example.com/test ->…

user2370460
- 213
- 1
- 3
- 7
1
vote
1 answer
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 the document root.
Since some of the legacy scripts…

Emanuel Oster
- 113
- 4
1
vote
1 answer
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
/files
/logo.png
/style.css
…

LWChris
- 111
- 1
- 4
1
vote
1 answer
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 want to remove CORS control from api requests.
When…

okancelik
- 111
- 3
1
vote
1 answer
apache alias pages that load relative resources
I am trying to alias a path to a specific file
I tried:
Alias /Console "/console/console.html"
Now going to http://example.com/Console indeed brings console.html.
but any relative resource referenced from within console.html (ie, images\1.jpg)…

kofifus
- 163
- 2
- 8
1
vote
1 answer
What wrong with RedirectMatch of Apache 2.2 mod_alias?
We use Apache HTTPD server version 2.2.
I try to use RedirectMatch of Apache 2.2 mod_alias without success ( http://httpd.apache.org/docs/2.2/mod/mod_alias.html#redirectmatch)
I need to create rule that will redirect only URLs whit parameters…

Michael
- 597
- 3
- 9
- 23
1
vote
1 answer
Conditionally serving files from a directory outside of the document root with Apache2
I have inherited a web application written in PHP. The code is not the best and I want to start using the Symfony framework. It will be a gradual migration through several releases so I need the legacy pages, web scripts, css files and images to…

emurano
- 111
- 3
1
vote
1 answer
Is it possible to mix Alias and AliasMatch with Apache
I have a generic alias match like:
AliasMatch ^/plugins/([^/]*)/(.*) /usr/share/tuleap/plugins/$1/www/$2
...
and I want to add a specific configuration for a directory…

Manuel VACELET
- 125
- 1
- 9
1
vote
2 answers
Alias or redirect or rewrite
Roundcubemail and Owncloud folders live on the document root but because of the limitations of the Roundcube OwnCloud Plug-in I have to organise the vhosts as below. $rcmail_config['owncloud_url'] = 'https://webmail.whitecube.com/owncloud'; -…

Steve
- 13
- 6
1
vote
1 answer
Efficient 301 redirects in Apache (www to non-www and vice-versa)?
I came across an article titled "Efficient 301 Redirects."
For example, if you are trying to redirect your site from www to non-www domain, the article suggests that when compared to this .htaccess/httpd.conf rule:
…

its_me
- 225
- 1
- 7
- 23
1
vote
2 answers
Stylesheets not loading in mediawiki
I'm trying to set up an internal mediawiki site with version 1.19 on RHEL 6.2 with Apache. On loading any wiki page, Mozilla reports
Error: The stylesheet…

benf
- 111
- 5
1
vote
2 answers
Apache 410 Gone instructions not working with mod_alias nor mod_rewrite
Apache 2.2 (on a server running cPanel) seems to be ignoring instructions to return a 410 status.
This happens for both mod_alias's Redirect (using 410 or gone) and mod_rewrite's RewriteRule (using [G]), being used inside a .htaccess file.
This…

Peter Boughton
- 594
- 2
- 7
- 19