You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It is a simple landing page for anyone who want to redirect traffic from their website to a 3rd party.
.htaccess redirect
Apache Redirect 301 / https://cssmfc.github.io/block/access-denied.html
where 301 is permanent redirect / This specifies that all requests to the root directory and any files or folders within it will be redirected.
Redirecting a Specific Directory
If you only want to redirect a specific directory and its contents: Redirect 301 /old-directory/ https://cssmfc.github.io/block/access-denied.html
Using RewriteRule for More Flexibility
The RewriteRule directive offers more powerful pattern matching and redirection capabilities. Here's how you can use it for a general redirect:
RewriteEngine On
RewriteRule ^(.*)$ https://cssmfc.github.io/block/$1 [R=301,L]
RewriteEngine On: This line enables the rewrite engine. You only need this once in your .htaccess file. RewriteRule ^(.*)$ https://www.your-new-website.com/$1 [R=301,L]: ^(.*)$: This is a regular expression that matches any characters (.) zero or more times (*) from the beginning (^) to the end ($) of the requested URL path. The parentheses capture the matched part. https://cssmfc.github.io/block/$1: This is the target URL. $1 refers to the content captured by the parentheses in the RewriteRule (i.e., the entire original path). This ensures that if someone visits your-old-website.com/some/page.html, they will be redirected to https://www.your-new-website.com/some/page.html. [R=301,L]: These are flags: R=301: Specifies a permanent redirect (HTTP status code 301). L: Stands for "Last". It tells the rewrite engine to stop processing any further rewrite rules once this one is matched.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
It is a simple landing page for anyone who want to redirect traffic from their website to a 3rd party.
.htaccess redirect
Apache
Redirect 301 / https://cssmfc.github.io/block/access-denied.htmlwhere
301is permanent redirect/This specifies that all requests to the root directory and any files or folders within it will be redirected.Redirecting a Specific Directory
If you only want to redirect a specific directory and its contents:
Redirect 301 /old-directory/ https://cssmfc.github.io/block/access-denied.htmlUsing RewriteRule for More Flexibility
The
RewriteRuledirective offers more powerful pattern matching and redirection capabilities. Here's how you can use it for a general redirect:RewriteEngine On:This line enables the rewrite engine. You only need this once in your.htaccessfile.RewriteRule ^(.*)$ https://www.your-new-website.com/$1 [R=301,L]:^(.*)$: This is a regular expression that matches any characters(.)zero or more times(*)from the beginning(^)to the end($)of the requested URL path. The parentheses capture the matched part.https://cssmfc.github.io/block/$1: This is the target URL.$1refers to the content captured by the parentheses in theRewriteRule(i.e., the entire original path). This ensures that if someone visitsyour-old-website.com/some/page.html, they will be redirected tohttps://www.your-new-website.com/some/page.html.[R=301,L]: These are flags:R=301: Specifies a permanent redirect (HTTP status code 301).L: Stands for "Last". It tells the rewrite engine to stop processing any further rewrite rules once this one is matched.Beta Was this translation helpful? Give feedback.
All reactions