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

How to use .htaccess to alias/redirect subdomain to another domain sub folder

I'd like my users to go to red.example.com and what they actually see is a page served up from blue.example.com/red Is this possible using .htaccess? Essentially it's a redirect, but I don't want to have the URL change in the address…
justinl
  • 10,448
  • 21
  • 70
  • 88
2
votes
2 answers

301 redirects redirecting not the specified link

want to redirect some links from oldsite to new one and doing like this: Redirect 301 /benefits http://newsite.com/our-differiantiators/ Redirect 301 /benefits/our-people http://newsite.com/about-us/ Redirect 301 /benefits/our-places…
Scorpioniz
  • 1,421
  • 3
  • 16
  • 36
2
votes
1 answer

301 redirect with wildcard in htaccess file not working

I am trying to redirect these pages /reviews/page/2/ /reviews/page/3/ to this /reviews/ using this line: Redirect 301 /reviews/page/./ /reviews/ But it's not working. I've tried other combinations like .* and ^.*$ but nothing works. Only…
besla
  • 35
  • 3
2
votes
2 answers

301 Redirect for Query String on Root?

I have tried multiple methods of trying to redirect some URLs with a query string on the root, for example, if I try to match the URL http://example.com/?bloginfo=racing Redirect 301 "/?bloginfo=racing" http://example.com/racing or RedirectMatch…
Miura-shi
  • 4,409
  • 5
  • 36
  • 55
2
votes
0 answers

What is the htaccess syntax to bulk redirect URL using variables?

I am trying to use a generic rule to redirect old product url to new product url. Url looks like: www.xyz.com/product1-oldname-xyz.html to www.xyz.com/product1-newname-xyz.html So the URL stays the same except the bold part. Is there a generic…
Paul
  • 21
  • 2
2
votes
1 answer

Using 301 redirect (.htaccess) or a different solution to not change the url

I changed some URLs on my website, so now I need to redirect the old URLs (due to external links) to the new ones. I tried to use something like this in my .htaccess file: Redirect 301 /pt/oldpage https://www.example.com/pt/newpage The redirect…
2
votes
1 answer

Multi frameworks with single domain using Htaccess?

I am too new in server technology. I have some problem with configuration of multi frameworks in single domain. The scenario is, i have a folder structure like below /web /project-angular /dist/index.html …
Brn.Rajoriya
  • 1,534
  • 2
  • 23
  • 35
2
votes
1 answer

Get an infinite loop, htaccess redirect

Small question, I want my website www.example.nl/nl redirect to www.example.nl/nl/home But If I do this: Redirect 301 /nl/ https://www.example.nl/nl/home Then I get an infinite loop, because the home url contains the nl variable What is the best…
user3456438
2
votes
1 answer

Apache htaccess Redirect - Why does my double quoted request string act find and replace?

Redirect 302 "/blog" / I would expect this rule to take requests from /blog to / and /blog/stuff to /; instead of /blog/stuff to //stuff The behavior of going from /blog/stuff to //stuff is what I would expect from an unclosed regex what is going…
ahnbizcad
  • 10,491
  • 9
  • 59
  • 85
2
votes
0 answers

How can I redirect and open content from a different directory to DocumentRoot in .htaccess?

I've tried searching for my exact issue and couldn't find it. I don't want to redirect to a different domain, I merely want to achieve the equivalent of Alias in .htaccess. I'll explain what I have. I'm using SiteGround cloud hosting and don't have…
2
votes
1 answer

Redirect everything but 1 URL and it's sub URL's

I'm trying to redirect everything on a website but 1 Joomla URL (and URLS containing this keyword). Example: Should redirect everything from www.mydomain.com to www.mynewdomain.com but this: www.mydomain.com/home/index.php/quality/* I tried…
2
votes
2 answers

Redirect Match with excluding URLs doesnt work

I use a RedirectMatch rule which should exclude the following two URLs:…
tom84
  • 371
  • 1
  • 3
  • 15
2
votes
1 answer

Whats wrong with my Redirect 301 Regex?

Google Search Console has some crawl errors and can't find these links: home-third-blog-posts/page/10/ home-third-blog-posts/page/5/ home-third-blog-posts/page/7/ home-third-blog-posts/page/9/ And my Redirect rule in .htacces looks like…
moeses
  • 497
  • 1
  • 6
  • 21
2
votes
1 answer

How to setup Apache to run Laravel rooted from a subpath?

The DocumentRoot of example.com is in /var/www/html. Laravel is installed in /var/www/example/public and I can access it using http://example.com/dashboard but problem arises when I try to access other routes like as…
itsazzad
  • 6,868
  • 7
  • 69
  • 89
2
votes
1 answer

Apache Rewrite and Alias combined

We have run into an issue where we have an existing Alias, and we would like to add a rewrite rule to catch all variations of case-insensitive spellings, ie: URL: http://www.example.com/example Alias /example "/var/www/html/web/example" We need…
Larry
  • 21
  • 1
  • 2
1 2
3
14 15