VirtualHost Redirection, WP Bitnami Multisite, AWS EC2, Ubuntu 16.04, Apache 2.4.39

Bitnami WordPress Multisite on an AWS EC2 instance, Ubuntu 16.04, Apache 2.4.39

Do you want to use the redirect directive inside VirtualHost sections in /opt/bitnami/apache2/conf/extra/httpd-vhosts.conf redirect old site / old page at new site / new page

Here's what I'm having right now

DocumentRoot "/ opt / bitnami / apps / wordpress / htdocs"
ServerAlias ​​
Redirect permanent / old-page / https: // new-site / new-page /
Redirect https: // new-site / new-page / permanent / old-page

  SSLEngine on
SSLCertificateFile "/opt/bitnami/apache2/conf/"
SSLCertificateKeyFile "/opt/bitnami/apache2/conf/"
DocumentRoot "/ opt / bitnami / apps / wordpress / htdocs"
ServerAlias ​​
Redirect permanent / old-page / https: // new-site / new-page /
Redirect https: // new-site / new-page / permanent / old-page

I have tried many variants and the only one that works is the redirection of http: // old-site / old-page /

From these three, it does not work:
http: // old-site / old-page
https: // old-site / old-page /
https: // old-site / old-page

It just displays old site / old page / (that is the content of this page)

Any suggestions would be greatly appreciated!

stop redirection on / wp-login

I've installed a modified version of WordPress with "Duplicator"
I think it's a problem I think it's in the redirect
How can I stop it?
http: //mysite/wp-login.php redirect_to = http% 3A% 2F% 2F45.63.40.242% 2Fwp admin 2Fadmin.php%%% 3Fpage 3Dduplicator-tools 26tab%%% 3Ddiagnostics 26section 3Dinfo%%% 26package? 3D0% 26safe_mode

URL redirection regular expressions redirecting everything after the first viriable

I'd like to redirect a lot


I'm trying to add the redirection in the redirection plug-in.

Thank you.

redirects – Multiple pages under single directory redirection to a single page

You are close, but there are errors:

RewriteRule ^ /. * $ ....

In .htaccess, the URL path corresponding to the RewriteRule model do not start with a slash, so this should be just ^. * $ (or even just . * – since regex is greedy by default), not ^ /. * $. By including the prefix slash, it will never match, so the directive does nothing. (You would need the slash prefix in a server or virtualhost the context.)

RewriteCond% {REQUEST_URI} ^ / page / product / New-Design / * [NC,OR]

the CondPattern (2nd argument to the RewriteCond directive) is a regex. The escape * it looks like you're treating as a joker expression. the * at the end, the preceding character is at least 0 times the preceding character. In this case, it corresponds to a slash equal to or more than 0 times. This does not correspond to the URLs you want to redirect. You should either use . * (to match 0 or more of any character: the point), or omit it completely, since it's enough to match the URLs starting with this path.

RewriteCond% {REQUEST_URI} ^ / page / product / New-Design / * [NC,OR]
RewriteCond% {REQUEST_URI} ^ / page / product / nature-of-purchase-design / * [NC,OR]
RewriteRule ^ /. * $ Https:// [R=302,L]

You should never include the OR flag on the last condition. That's basically saying OR true and the rule will run without condition (that is, if the RewriteRule model paired).

    RewriteCond% {REQUEST_URI} ^ / engine.jsp * [NC]
 RewriteRule ^ /. * $ Https:// [R=302,L]

the REQUEST_URI server variable does not contain the query string, so if you want to match all query string then you have nothing to do in this regard, you just need to match the required URL path. (To specifically match the query string, you need a condition that checks the REQUEST CHAIN server variable.)

In addition, wherever possible, it is more efficient to perform the necessary URL path checks in RewriteRule modelrather than using a RewriteCond (condition) directive. So, the above could be rewritten into one directive:

    RewriteRule ^ engine  .jsp $ [R=302,L]

Do not forget to escape the literal points in the regex. In your question, you indicated that this should be redirected to, do not, as you said here?

In summary

So, by bringing this together, try the following instead. Note that these guidelines must go before the WordPress front controller, at the top of the .htaccess file.

RewriteRule ^ page / product / (new-design | nature-of-purchase-design) / [NC,R=302,L]

RewriteRule ^ engine  .jsp $ [NC,R=302,L]

RewriteRule ^ page / product / (old model | nature-of-old-design-purchase) / [R=302,L]

Note that I removed the end-of-line anchor ($) of RewriteRule model. And changed the model in lower case, since you have the North Carolina (In no case) flag anyway.

UPDATE: To redirect only when a query string is present on the /engine.jsp The URL, you will need to add a condition to the middle rule that checks the REQUEST CHAIN server variable. For example:

RewriteCond% {QUERY_STRING}.
RewriteRule ^ engine  .jsp $ [NC,QSD,R=302,L]

The regex (one point) in the CondPattern ensures that the query string is present on the request.

UPDATE # 2: The QSD (Apache 2.4+) flag is required to ignore the query string of the redirected response.

redirects – canonical tags on form page redirection

I'm adding canonical tags to our website and I'd like to add them to the pages on which users can download guides, but depending on the user's settings, they could be redirected.

If they are cooked, they will go directly to the canonical URL, for example. / downloads / white paper

If they are a new user, they are redirected to a page with a form field to provide information before the download. This page has an event code in the URL / downloads / lituraturemain? event = ABC-123-DEF-456

What are the best practices for adding canonical tags in a situation like this?

development – Disable redirection to a canonical domain (or a host Web site on any host name)

I want to have various development (say and the transfer environments of a multisite WordPress ( For that, it would be good for WordPress not to redirect to what it considers the canonical domain name.

I'm having trouble with that in my wp-config.php:

define (& # 39; DOMAIN_CURRENT_SITE & # 39 ;, gethostname ());

He redirects to or gives me database errors.

It's after wp search-replace

Is it possible to disable this redirection? If so, how?

rewrite mod – Apache redirects: multiple pages under a single directory redirection rule

I have the following scenarios for web page referrals

1) All pages under* and all the pages under*

should be redirected to

2) Pages like and should be redirected to . There are several pages with* who should be redirected to

3) All pages under* and all the pages under*

should be redirected to .

To implement the above scenarios, I tried the following redirection rules

            RewriteCond% {REQUEST_URI} ^ / page / product / New-Design / * [NC,OR]
   RewriteCond% {REQUEST_URI} ^ / page / product / nature-of-purchase-design / * [NC,OR]
   RewriteRule ^ /. * $ Https:// [R=302,L]

   RewriteCond% {REQUEST_URI} ^ / engine.jsp * [NC]
   RewriteRule ^ /. * $ Https:// [R=302,L]

   RewriteCond% {REQUEST_URI} ^ / page / product / Old-Design / * [NC,OR]
   RewriteCond% {REQUEST_URI} ^ / page / product / nature-of-olddesign-purchase / * [NC,OR]
   RewriteRule ^ /. * $ Https:// [R=302,L]

The rules are in .htaccess file . is a wordpress site but not with multisite functionality.

With the rules above, referrals do not occur. So, please suggest how to make the redirects work.

Redirection / deactivation of IP access on OVH VPS

Sorry if I post in the wrong section.

I'm new to Linux and VPS, so please excuse me for being a bad guy.

I have recently received VPS from OVH and installed WordPress (Debian 8) from their drop down menu. The server works very well with Apache, Mysql, FTP, SSH, it is a very nice and fast installation.
Added SSH keys, A & CNAME records pointing to the OVH IP address, enabling Flexible HTTPS technology on CloudFlare, everything looks nice.

The site works properly when accessing via a domain name, but it is still possible to access the site using the direct IP / OVH host name.

What can I do to redirect / disable direct access to

infopath – Redirection to the SharePoint home page with the button 'Cancel & # 39;

I have created a form in InfoPath with two buttons: "Submit" and "Cancel". When you click the 'Submit' button, it submits the data to the list library and closes the form. The cancel button & # 39; when you click it closes the form and returns to the list library. I WANT TO instead, to be redirected to the home page of my SharePoint site when the user clicks the 'Cancel' button.

enter the description of the image here

Every answer found online mentions this option & # 39; & # 39; & Source = http: // url-of-page & # 39; which can be added to the button of a form to redirect it to another web page. BUT nobody explains it clearly because I do not understand where to start.

If anyone could give me clearer instructions on how I could achieve it, that would be very appreciated! Even though it does not use the method I mentioned.

Thank you so much! 🙂

Administration page redirection to dashboard

When I go to Store Settings, among other pages, it is always redirected to the dashboard. no error browser, no errors in log files, so I do not even know how to get advice. no suggestion on how can I debug this please?