# XAMPP alias or rewrite?

I have a website working on W2012 with XAMPP. I have a real-time website that remained in subfolder/ foo. It currently requires to be transformed to/ residence.

I set up an alias

Alias /foo "C:/xampp/htdocs/home"


This takes users from foo - - >home nonetheless they shed the web page that they were mosting likely to. The trouble is a great deal of the web pages on foo were independently offered so we would certainly be anticipating users to recognize that they require to replicate their web page to the new url. I require a customer mosting likely to foo/client - trial to go instantly to home/client - trial.

Addition: Yesterday I set up a redirect.

Redirect foo/client-demo home/client-demo


This functions. After that I assumed that the factor the Alias isn't functioning is my SSO. I have an SSO SAML login manuscript that redirects the customer the their access web page. So if the customer begins at foo/xyz the pen names kicks them to home/xyz (possibly on the xyz) and afterwards they struck the login manuscript and also return to their reference web page.

2
2022-07-25 20:42:38
Source Share

nonetheless they shed the web page that they were mosting likely to.

I'm not exactly sure what you suggest by this - they should not "lose" anything? Nonetheless, the URL in the address bar will not be upgraded - if that is what you are indicating? An Apache Alias transforms a URL to a web server - side filesystem course (generally to permit accessibility to documents situated beyond the record origin) - it does not adjust the URL.

It seems like you desire an exterior redirect (301 - irreversible). As an example, making use of mod_alias (prefix matching) :

Redirect 301 /foo /home


This thinks that you are not currently making use of mod_rewrite to procedure redirects/rewrites (such as with WordPress). If you are currently making use of mod_rewrite for this objective after that you have to additionally make use of mod_rewrite for this redirect, given that the order of implementation could not be as anticipated. For example:

RewriteRule ^/?foo(.*) /home\$1 [R=301,L]

1
2022-07-25 21:01:50
Source