Skip to main content

Redirects and Hard Links

Comments

3 comments

  • cPanelMichael
    Hello, Can you let us know the specific rewrite rules you are using in the .htaccess file within the document root of the original domain name? It's likely you will need to update the Mod_Rewrite rules for your specific criteria. StackOverflow is a useful resource for help with custom rewrite rules. Try entering the "Mod_Rewrite .htaccess redirect all files to new domain name site:stackoverflow.com" as a search term on Google and you should see several results with examples to test. Thank you.
    0
  • coolcom
    This is the current .htaccess file: RewriteEngine on # #RewriteEngine on #RewriteOptions inherit #RewriteCond %{HTTP_HOST} ^domain.com$ [OR] #RewriteCond %{HTTP_HOST} ^www\.domain\-t\.com$ #RewriteCond %{REQUEST_URI} !^/[0-9]+\..+\.cpaneldcv$ #RewriteCond %{REQUEST_URI} !^/\.well-known/pki-validation/[A-F0-9]{32}\.txt(?:\ Comodo\ DCV)?$ #RewriteRule ^/?$ "https\:\/\/newdomain\.co\/" [R=301,L] RewriteCond %{HTTP_HOST} ^domain\.com$ [OR] RewriteCond %{HTTP_HOST} ^www\.domain\.com$ RewriteCond %{REQUEST_URI} !^/[0-9]+\..+\.cpaneldcv$ RewriteCond %{REQUEST_URI} !^/\.well-known/pki-validation/[A-F0-9]{32}\.txt(?:\ Comodo\ DCV)?$ RewriteRule ^/?$ "https\:\/\/newdomain\.co\/index\.php\/en\/" [R=301,L] Yes, I was thinking something to do with Mod_Rewrite as well. I'll do as you suggest and research the above... we should be able to solve from there. Thanks,
    0
  • coolcom
    OK... so the .htaccess should look like: RewriteEngine on RewriteRule ^(.*)$ https: //newdomain.com/$1 [R=301] (space added to URL above to allow it to show) I changed it to that and all works as expected now. So yes, I probably need to make adjustments to the Mod_Rewrite. Will do so. Thanks.
    0

Please sign in to leave a comment.