Redirect any directory to another directory

Mark

I want to redirect all directories to another directory.

Example:

http://www.example.com/my/cool/link

should redirect to

http://www.example.com/xyz

Thanks in advance

CraftyScoundrel

If I understood your question correctly, you wish to redirect all directories on the server to one specific directory?

If that's the case, try something like this

RewriteEngine on
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^(.*)$ /xyz

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

Redirect a content of the directory to another directory in parent folder

codeigniter redirect to another directory view

Is there a way to redirect INSTALLDIR to another directory?

.htaccess redirect to index.php in any directory

Redirect any directory if it has a specific query string

Redirect to frontend in directory or API in another directory using .htaccess

Redirect only root directory to another site

Redirect to another directory if url match pattern htaccess

Redirect a directory in a forwarded domain to another url with htaccess

htaccess - redirect directory but not sub directory

htaccess redirect directory but not files in directory

how to redirect the user if there are any directory name in the url htaccess

how to monitor a unix directory and if any new file in directory it will be copied to another directory

Redirect opening requests about a file in a given directory to another file in another directory

How to redirect all the files in root only to another directory?

Htaccess Redirect directory to another but allow the main folder URL to stay the same

How to redirect a request into another server with virtual directory specifc?

Redirect sed file to a another directory under a new name

htaccess - redirect rule on directory

Redirect directory to file .htaccess

.htaccess: redirect to sub directory

.htaccess redirect subdomain to directory

htaccess redirect subdomain to directory

htaccess redirect to a directory

htaccess multiple directory redirect

Redirect from a directory to a subdirectory

Robocopy - Copy directory into another directory

CentOS: Copy directory to another directory

Directory rewrite in .htaccess to another directory