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

use Apache Alias instead of RewriteRule to serve HTML page

A simple Alias in Apache configuration not working - Alias /url/path/some-deleted-page.html /url/path-modified/new-avatar-of-some-deleted-page.html It gives "page not found". However RewriteRule works as expected but it sends redirect status to…
0
votes
1 answer

How to redirect an url with parameters?

I'm at a total loss trying to integrate a mod_rewrite in my existing page. Currently, I am building a new site from scratch, and there i have some nice clean url's such as: http://www.example.nl/nl/example The old site, running Cms made simple, has…
Lg102
  • 4,733
  • 3
  • 38
  • 61
0
votes
0 answers

PHP-FPM, Apache and mod_alias

So, there seems to be really poor documentation for this, and I haven't found exactly how to do this. I am in the process of figuring out how to move my CMS to HTTP/2 and that requires PHP-FPM with Apache. As this is a CMS, I have tons of aliased…
Sandman
  • 2,323
  • 5
  • 28
  • 34
0
votes
1 answer

Dynamic directory alias with Apach 2.4

I'm wondering if it's possible to create a dynamic directory alias based on the requested subdomain. If a user requests the URL https://{subdomain}.site.com/images/ I would like the file system folder /full/linux/path/to/{subdomain}/images/ to be…
tim
  • 2,530
  • 3
  • 26
  • 45
0
votes
1 answer

apache "Access forbidden! Error 403" when creating alias to a directory in home

I'm new to apache. I'm trying to create an alias to my project folder which is in home/Documents/Projects/blog directory. I added this to httpd configs: Alias /blog "/home/ehsan/Documents/Projects/blog/ui/dist"
kiasaty
  • 187
  • 1
  • 11
0
votes
1 answer

.htaccess file delivering unexpected redirection

My .htaccess code below is giving unexpected results. Please help me to fix this by referring expected result vs output result. Redirect /main-page https://example.com/new-main-page Redirect /main-page/sub-page1…
Manojkumar
  • 1,351
  • 5
  • 35
  • 63
0
votes
1 answer

Apache 'Directory Alias' not working in vagrant Homestead

In attempting to replicate our production servers on my local machine I have created a 'Directory Alias' in Homestead's VirtualHost conf. However, regardles of the many settings I try from various Stackoverflow posts, I keep getting the same 404 not…
0
votes
1 answer

Removing double slashes from URL not quite working

I have a double slash in several of my URLs. I've fixed the problem that was causing the double slashes. But now I want to add 301 redirects so Google/Bing etc. know which is the correct page version. I attempted this with the htaccess rule, but my…
Vance
  • 1
0
votes
2 answers

mod_alias redirect tips

all. I search the sites but can not find my answer, so I post it. I want to redirect url like this example.com/css/.... ====> example.com/templates/css/... example.com/path/css/.... ====> example.com/path/templates/css/... I tired lots regular,…
9nix00
  • 3,852
  • 2
  • 21
  • 27
0
votes
1 answer

How can I Alias Or Rewrite the subfolder to a domain

I have a folder structure like this / /project1 I normally use it with one domain (example.com), but now I want to use it as a sepreate domain (project1.example.com) and I am using apache virtualhost. I have succeed to setup, but some problem on…
tommyvca
  • 51
  • 1
  • 6
0
votes
1 answer

how to redirect a url to other domain as it?

my primary domain is makemyhome.com and another one mmh.com now when a user click on the link mmh.com/about it should redirect to makemyhome.com/about. when a user click on mmh.com/contact it should redirect to makemyhome.com/contact right now my…
Hola
  • 2,163
  • 8
  • 39
  • 87
0
votes
1 answer

Domain - Fake alias/page

I was thinking about the following but to be honest I'm not even sure if it's possible (or how it is done). Let's suppose that I have www.domain.com, I need to create like "fake pages/alias" for my users. For example, user peter should be able to…
TerminatorX
  • 307
  • 3
  • 13
0
votes
1 answer

Apache AliasMatch Variable Redirect Loop

I'm trying to set up apache with an alias with and rewrite rules. I have rewrite set up to forward all requests to index.php. That works great. My issue is with setting up the AliasMatch for some specific locations. If the client browses to…
Grant Martin
  • 125
  • 1
  • 2
  • 16
0
votes
1 answer

.htaccess 301 Redirects using RedirecMatch or RewriteRule

I am attempting to create some 301 redirects using .htaccess in order to fix some Crawler Errors that Google is encountering. Google is using old versions of some of my URLs, which is causing errors to arise when the spider attempts to access the…
0
votes
0 answers

Simple 301 redirect using mod_alias not working

I tried to redirect a page '/page-one' to '/page/one/' just using Redirect directives but it doesn't work. I tried several options but none of them make it works: Redirect 301 /page-one /page/one/ Redirect permanent /page-one /page/one/ Redirect 301…
JFraper
  • 46
  • 3