1

Using Cpanel xMLAPI Client Class or Cpanel API 1 or 2 or any other method - looking for a way to redirect a url using PHP.

I assume any of these methods just adds to a mod_rewrite in .htaccess file.

ex. mysite.com/myfolder -> mynewsite.com/myfolder

Googled, checked SO, and Cpanel docs, but could not find a way. Not sure if possible.

Pradeep
  • 9,667
  • 13
  • 27
  • 34
WGS
  • 199
  • 4
  • 17
  • google "301 redirect cpanel"? https://thedigitalelevator.com/how-to-301-redirect-in-cpanel-the-easy-way/ – ficuscr Apr 17 '19 at 16:19
  • 1
    Thanks, but trying to do this with a script automatically on an as-needed basis for hundreds of urls. – WGS Apr 17 '19 at 16:28
  • 1
    If you could explain a bit more what you are trying to do... Are these sites all instances of the same thing? You have hundreds of domains redirecting to new domains? I'd remove cpanel from equation... Approach as httpd / mod_rewrite / scripting problem. – ficuscr Apr 17 '19 at 16:39
  • That makes sense. I will work on it from that angle. – WGS Apr 17 '19 at 16:51

0 Answers0