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
0
votes
1 answer

Aliasing gitweb css in apache2?

On an Ubuntu Server 14.04, I have $ apt-show-versions apache2 apache2:amd64/trusty-updates 2.4.7-1ubuntu4.9 uptodate Here, I installed gitweb, and tried to set it up. Eventually, I managed to get it working by adding the following to my…
sdaau
  • 36,975
  • 46
  • 198
  • 278
0
votes
2 answers

Fixing mod_rewrite and mod_alias conflict

I have a VirtualHost setup like this : Alias /somedir /some/other/dir http://example.com/somedir works fine However, I need to setup mod_rewrite for /somedir (a CodeIgniter app for which I want clean URLs). Here's the bit from the CodeIgniter wiki…
Andrei
  • 1,606
  • 4
  • 19
  • 31
0
votes
1 answer

apache2 url cropped when alias used

I setup my mediawiki server with apache2. I use alias to redirect my url to the right location: (/etc/apche2/conf-enabled/mediawiki.conf) Alias /wiki /var/lib/mediawiki Options +FollowSymLinks AllowOverride…
Nicolas
  • 2,191
  • 3
  • 29
  • 49
0
votes
1 answer

Apache alias/rewrite to a subdirectory without redirecting

As an example, I am accessing project foo at https://localhost/projects/foo/dev/. I'd like to rewrite the URL so that https://localhost/projects/foo/ points to projects/foo/dev/ in my DocumentRoot folder This should not be an HTTP 3xx redirect.…
rink.attendant.6
  • 44,500
  • 61
  • 101
  • 156
0
votes
1 answer

Redirect all but 2 links to new URL

I have domain.de and domain.com. In the past I have used both domains, but now I want to use only the domain.de and domain.com should redirect to domain.de/en. But there are 2 links which need to be domain.de/api/xx1 + domain.de/api/xx2 (so without…
Owlet
  • 49
  • 6
0
votes
1 answer

Two different projects (different index.php's) on same server

I'm trying to run two different php frameworks on the same server. The framework to use is determined by the first path in the uri. So for example: http://www.example.com/v1/requestname will go to the index.php located in:…
Jhouse153
  • 1
  • 2
0
votes
2 answers

VirtualHost configuration issue

I have two apps I want to serve via port 80 in Apache on the same ip host. To do so, I have defined the following virtual hosts: NameVirtualHost *:80 DocumentRoot "/var/www/wsgi/rest_api" ServerName api …
horcle_buzz
  • 2,101
  • 3
  • 30
  • 59
0
votes
1 answer

Apache Alias + Rewrite: How to change absolute path of aliased folder

I have a website that I need to move to a subdirectory. Alias /oldsite /home/server/public_html/oldsite My question is, is there a way to rewrite all of the requests for absolute paths from the root to the new directory? For example:
0
votes
1 answer

How can I get mod_rewrite and mod_alias to work together?

I have a Windows/Apache/PHP environment set up to imitate a shared hosting account but cannot get mod_alias and mod_rewrite to play nicely with one another. Both are definitely enabled at the server level and on a per-site basis. I have…
Matt
  • 9,068
  • 12
  • 64
  • 84
0
votes
0 answers

Access files outside of DocumentRoot

http://site1.bla.example.com, http://site2.bla.example.com, and http://site2.bla.example.com all point to /var/www/html which is my DocumentRoot. Given the following directory structure, I would like http://site1.bla.example.com/files/somefile1.png…
user1032531
  • 24,767
  • 68
  • 217
  • 387
0
votes
1 answer

301 Redirect not working correctly

I need to redirect a Blog on a subdomain running on Ghost and all its posts to a new location. The currently sits in http://blog.example.com and needs to be redirected to http://example.com/blog/ For the original Ghost blog, Apache was used as a…
user3046831
0
votes
1 answer

.htaccess why problem when using ? in Redirect

i have this line Redirect /?page=cms_page&id=12 http://www.domain.dk/case when i type ?page=...... its not will work if i only use page=..... its will work fine but not the user type domain.dk/?page=cms_page&id=12 So now i ask you guys what have i…
ParisNakitaKejser
  • 12,112
  • 9
  • 46
  • 66
0
votes
1 answer

RewriteBase needed when using mod_alias

In my apache config i created an alias: Alias /projecten "C:/Users/Youri/SkyDrive/Projecten" # # Possible values for the Options directive are "None",…
yooouuri
  • 2,578
  • 10
  • 32
  • 54
0
votes
2 answers

Apache DirectoryIndex directive not working correctly with Ruby on Rails

I have a site where Ruby on Rails is running at the root directory via Phusion Passenger. Some Apache Alias directives serve static HTML directories. If you request an exact URL of a file from one of the static directories, Apache returns it as…
sffc
  • 6,186
  • 3
  • 44
  • 68
0
votes
1 answer

Apache mod_rewrite , suffix based to prefix based hosting

I'm working on a site hosted on apache. Users can access their webspace in the default way at www.hostname.com/~username. I'm trying to change to username.hostname.com as it's a little cleaner. If users try to access the old…