× Here you can get community support related to ReDJ.

Internal domain redirect

  • avkeele
  • Topic Author
  • Offline
  • Fresh Boarder
  • Fresh Boarder
More
2 weeks 5 days ago #7152 by avkeele
Internal domain redirect was created by avkeele
Hi,

I have two domains pointing to the same server and bring up the same site. The other domain, certifiedcybersecurity.com, is simply resolving to the same IP as certifiedinfosec.com, so ReDJ will see incoming certifiedcybersecurity.com requests from both domains.

The site comes up under either domain URL, and the domain stays the same for each in the URL address. However, I need a universal redirect rule that flips certifiedcybersecurity requests into certifiedinfosec pages, but without fighting itself on requests already formatted for certiedinfosec.com.

I tried configuring a simple rewrite in .htaccess, but is does not flip the URL path successfully. The certifiedcybersecurity requests stay certifiedcybersecurity in the URL path. Plus, I need the redirect to not return a redirect 201 code to the browser. the ultimate goal of this exercise is to get around a false site block to certifiedinfosec.com that was imposed by a popular social media site that won't respond to my help requests. If it sees a 301 or 302, the redirect is blocked too.

I need to configure a domain re-direct to change all certifiedcybersecurity.com URL requests to certifedinfosec.com url equivalents, but I need it to return a 200 response to the browser instead of a 301 or 302 response. I can't use an HTTP meta refresh since the same site serves both domains.

I am fairly clueless with re-direct language and regex. Can you tell me how to configure ReDJ to help? I searched through posts, but could not find how to do this.

Thanks.

Allen

Please Log in or Create an account to join the conversation.

  • avkeele
  • Topic Author
  • Offline
  • Fresh Boarder
  • Fresh Boarder
More
2 weeks 5 days ago #7153 by avkeele
Replied by avkeele on topic Internal domain redirect
Ok. I finally got the 301 redirect to work and properly change the URL domain path in the browser. However, I still have that pesky 301 code return. If I change the rewrite rule to return 200 as the code, the rule breaks and the request fails. I was hoping it would simply rewrite and send back the 200 success code ;-). Nope.

I am hoping I can use ReDJ to accomplish goal since it allows nice control over the response codes.

Please Log in or Create an account to join the conversation.

Time to create page: 0.136 seconds