Questions tagged [mod-alias]

Apache module providing namespace configuration & redirection.

mod_alias is an Apache HTTP Server module that provides mechanisms to map URL paths to directories on the filesystem or external (browser-based) redirections to other URLs.

211 questions
3
votes
1 answer

mod_alias Rewrite not working?

I have two servers: Fedora running Apache/2.2.14 (old server) CentOs running Apache/2.2.3 (new server) I've been using this Rewrite rule for quite sometime with absolute success on the old server: Redirect 301 /index.html / But on the new…
Frankie
  • 24,627
  • 10
  • 79
  • 121
3
votes
1 answer

url redirect not working properly

I am using below rule to redirect my url Redirect 301 /crm /crm/applications But the resulting url because of rule is…
Paritosh Mahale
  • 1,238
  • 2
  • 14
  • 42
3
votes
1 answer

mod_alias vs mod_rewrite precedence

I have an apache config file making use of both mod_alias's Redirect directive, and mod_rewrite's RewriteRule. From my understanding, mod_alias works in order of top to bottom of the file, and mod_rewrite the opposite, the last rule is matched,…
darethas
  • 7,377
  • 3
  • 23
  • 32
3
votes
1 answer

301 Redirect to single url without autosubstitution

I need to redirect site's visitors from /good/cats to /bad. What i write: Redirect 301 /good/cats http://somedomain/bad What i get: http://somedomain/bad/cats What should i write to redirect to the http://somedomain/bad?
Df.fpm
  • 189
  • 1
  • 5
  • 15
3
votes
1 answer

Dynamic Virtual Host with Dynamic Alias

I am using DNSMasq for this setup. I am having issues with Alias, as it does not work at all for dynamic virtual hosts. And there's no such a thing as VirtualAlias in Apache documentation. I am trying to setup my new environment just like I did…
dvlden
  • 2,402
  • 8
  • 38
  • 61
3
votes
1 answer

Apache 2.4 AliasMatch keeps returning 404 when Alias works

I'm trying to redirect calls to my Apache 2.4 virtual host (Wampserver 2.5) that match a certain pattern to a directory outside of my DocumentRoot. Here is the relevant code from my .conf file: ServerName testserver.dev …
Scott
  • 948
  • 2
  • 13
  • 25
3
votes
1 answer

DirectoryIndex not found on AliasMatch

From the documentation I have this: AliasMatch "^/projects/(.+)" "/var/www/domain.name/$1/public" It should match only URLs like ../projects/project1, not ../projects/ by itself. When I go to say, http://example.org/projects/project1/ it returns a…
James
  • 33
  • 3
3
votes
0 answers

Apache: File included inside vhost using Include directive does not evaluate variable defined in the vhost

After doing quite a lot of searching on google and here, I have not been able to find a solution to my problem. I used this article to learn how to create variables inside my vhost. It requires mod_define to be installed. I have a number of…
Pavan Prasad
  • 31
  • 1
  • 3
3
votes
0 answers

Symlinks or Alias within a LAMPP setup running Joomla

Sorry for the imprecise wording of this question however I have really hit a wall here. I have installed XAMPP/LAMPP on a machine running Debian. I then installed joomla on the installation of LAMPP. Everything is running correctly. I am now trying…
3
votes
1 answer

URL Redirect with Plus Sign

I am updating the naming conventions on some old urls. I am using htaccess to redirect to the new urls. I have some urls that use plus signs and these do not seem to want to redirect. For example: RedirectMatch 301…
3
votes
1 answer

Apache's Alias directive is not working as expected

I am trying to integrate my portal with my website. My website : http://example.com and My portal : http://portal.com Now I want to see my portal from : http://example.com/portal Part of my core apache config file…
Hussain
  • 5,057
  • 6
  • 45
  • 71
2
votes
1 answer

Using apache mod_alias in vhost to link assets from external server

This is an outside shot I know. I am supporting a site that has constantly changing assets that are excluded from the repository for obvious reasons. Currently I am having to FTP these assets to my local computer in order to develop and test…
lopsided
  • 2,370
  • 6
  • 28
  • 40
2
votes
1 answer

htaccess Redirect Single Page to Different Domain without Parameters

I have a site with the following htaccess file: RewriteCond %{THE_REQUEST} \s/+(.+?)\index.html/?[\s?] [NC] RewriteRule ^ /%1 [R=302,NE,L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^(.*)$ ./index.php?uri=$1…
user10012
  • 647
  • 1
  • 8
  • 23
2
votes
1 answer

Wildcard in URL (mod_alias or mod_rewrite)

I need to have URLs such as mydomain.com/whatever, where "whatever" can be any arbitrary string, all call the same php file where it sorts out what to display (or displays a 404). However, I want files and other php files to work normally (anything…
rob
  • 9,933
  • 7
  • 42
  • 73
2
votes
1 answer

Exclude Redirect rule on an Alias domain - for specific file (Robots.txt)

I have my main site: example.com that contains all files on its root folder. I have a new domain example.net, that I want users to use as an alias domain, so users will actually see the exact content of example.com and its files, yet see in their…
user8411456
  • 347
  • 1
  • 5
  • 18
1
2
3
14 15