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

how to use remove file extension from url using alias

I want to remove the file extension for some of my files using Alias in my Apache site config file, but i just can't get it to work. Here is an example: Alias "/alias" "/the/real/path" I have also tried this: Alias /alias /the/real/path With both…
cbh1608
  • 56
  • 1
  • 10
0
votes
1 answer

Redirect 301 except when a string is present in url with htaccess

I would like to redirect a subdirectory to a subdomain, but i have to maintenance the endpoints for sitemaps. What I need is: Redirect 301 /ru/ https://ru.mydomain.com #Exclude *sitemap* This kind of urls can't be…
0
votes
1 answer

Force HTTPS using Redirect in .htaccess

I've recently tried to force HTTPS on my website by using various directives contained in mod_rewrite. However it didn't workout very well and now it's recommented to use the Redirect directive from mod_alias. I've got everything in a subfolder and…
sgrontflix
  • 91
  • 1
  • 9
0
votes
1 answer

htaccess redirect subdirectories to upper level

What rule can I add .htaccess that would give me the following result? any subfolder that include "/manufacturer/any symbols" in url just rewrite to upper level, for example…
Yury Zheve
  • 13
  • 2
0
votes
1 answer

Apache Alias not working in .htaccess

I have installed Apache 2.4 on Ubuntu 16, all works. I have a website sitting on localhost, this also works fine. I need to be able to access files on a USB drive to use within the website. I'm using PHP to access the USB drive and obtain…
David Coles
  • 45
  • 1
  • 11
0
votes
1 answer

301 Remove Entire last Directory from url using htaccess

SCENARIO: Joomla + SH404 A previous version of a component was adding "/registration" to the event page url to redirect it towards the related registration form. The new version integrates the form in the same event page. The problem is that the…
Luc
  • 13
  • 4
0
votes
1 answer

Htaccess: how to redirect Urls?

I have an issue with a website that I am currently trying to redirect. The client wants the home page to be redirected to one website, and all other website pages to another website. It is an e-commerce site. I know how to redirect just the home…
Andy Penn
  • 35
  • 5
0
votes
1 answer

.htaccess url rewriting is working but not the redirection

I'm working on a local server on an html/php application and I'm trying to use the Apache url rewrite module without success The application was stored in ./Compta/index.php. I have to an .htaccess file in ./Compta/.htaccess I would like to only…
Keke Dix
  • 1
  • 1
0
votes
1 answer

WordPress wildcard subfolders

I need to make some subfolders aliases of main website. For example, I need that website.com/section1/ and website.com/section2/ act as website.com. I will use these folder as sections (regions) but the content will be the same for 80% of the site…
Papamike
  • 101
  • 2
0
votes
1 answer

.htaccess alias URL

I am trying to create a redirect of a temp URL using Redirect Permanent /dir/subdir http://www.domain.com/other_dir/htmlfile.html Note that "dir" exists in the file structure but "subdir" does not. In the browser if I type…
Xerri
  • 4,916
  • 6
  • 45
  • 54
0
votes
1 answer

Redirecting http traffic to https in Apache without using mod_rewrite

I am trying a pretty simple thing that I would normally do using a RewriteRule (and which works perfectly when I do). My goal: Force certain (not all) URLs to use the https protocol. Caveats: Apache is behind a crypto-offloader. We would like a…
Tom17
  • 406
  • 5
  • 18
0
votes
1 answer

How to redirect path to a different folder using mod_rewrite/mod_alias?

I have mod_rewrite and mod_alias enabled. I have some csv files saved in /home/ubuntu/csv. Due to reasons, I can't move files to any other folder. My website url redirects to /var/www/html. So wesbite-url.com would redirect to /var/www/html. What I…
Paagalpan
  • 1,261
  • 2
  • 16
  • 25
0
votes
1 answer

apache configuration for hybris

I have one webserver and two hybris servers. For example: webserver - http://10.0.0.1 Hybris - http://10.0.0.2:9001 and http://10.0.0.3:9001 Now I want to use webserver as a load balancer to redirect the requests. Redirecing is working fine but…
sanjiv
  • 269
  • 4
  • 12
0
votes
2 answers

Redirect from one domain to another, without the user realizing it

I have a bunch of domains on on of my servers. I'd like to be able to redirect some domains to a different domain without the user knowing, so not a 301 redirect. An example, redirect domain.com to masterdomain.com/sites/domain.com. So when visiting…
b2238488
  • 990
  • 2
  • 15
  • 32
0
votes
1 answer

Split DocumentRoot using Apache Alias per request path

I'm trying to slowly take over an existing website, route per route. I found Apache's Alias(Match) which seems to allow me to set a different (content) document root per request. But I'm failing with trailing slashes and more complex paths. My goal…
Lode
  • 2,160
  • 1
  • 20
  • 25