Please upgrade here. These earlier versions are no longer being updated and have security issues.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.

Modify URL in emails / change domain names

Hello. I have been using a free domain for my forum (vanilla 2.1) on a free host for a while, but now i parked a domain on the site (basically loads the same site) and i want to update all the urls so that they use the new domain name. Such as the email notifications for example. When i get an email notification it links to my old subdomain rather than my new domain and i can't find where to change it. Also if there is a way to replace all the links to the site within the site with the new domain that would be awesome too (like some sql command?)

Comments

  • edited May 2014

    Have you looked inside your config.php ?

    If you changed the names of domain and subdirectory in the htaccess file but the root is not being recognized

    $Configuration['Garden']['WebRoot'] = TRUE;

    Or you might need to do some permanent redirects in the htaccess file

  • @vrijvlinder‌ there is nothing that specifies a specific domain name/web root in my config file on 2.1

  • NeilAnimeNeilAnime New
    edited May 2014

    @vrijvlinder‌ i opened my .htaccess file and this is inside:

    it removed line breaks on here so i pastebin'd it:
    http://pastebin.com/u3XUbZRB

    I want to change from the .x10.mx domain but is it safe to change it in this .htaccess?

  • That is not Vanilla htaccess file that is for your domain.

    RewriteEngine on
    Options -Indexes
    ErrorDocument 401 /errors/401.html
    ErrorDocument 403 /errors/403.html
    ErrorDocument 404 /errors/404.html
    ErrorDocument 500 /errors/500.html
    
    RewriteCond %{HTTP_REFERER} !^http://domain.club/.*$      [NC]
    RewriteCond %{HTTP_REFERER} !^http://domain.club$      [NC]
    RewriteCond %{HTTP_REFERER} !^http://domain.x10.mx/.*$      [NC]
    RewriteCond %{HTTP_REFERER} !^http://domain.x10.mx$      [NC]
    RewriteCond %{HTTP_REFERER} !^http://www.domain.club/.*$      [NC]
    RewriteCond %{HTTP_REFERER} !^http://www.domain.club$      [NC]
    RewriteCond %{HTTP_REFERER} !^http://www.domain.x10.mx/.*$      [NC]
    RewriteCond %{HTTP_REFERER} !^http://www.domain.x10.mx$      [NC]
    RewriteRule .*\.(jpg|jpeg|gif|png|bmp|mp3)$ http://i.imgur.com/B0CQDpG.png [R,NC]
    

    Vanilla has it's own in the forum folder.

    Where is your host ?

    Where are the name servers pointing from your domain ?

  • NeilAnimeNeilAnime New
    edited May 2014

    @vrijvlinder‌ What forum folder? My forum is in the main htdocs directory and there is no "forum" folder and that is the only .htacess file there

  • peregrineperegrine MVP
    edited May 2014

    @vrijvlinder‌ What forum folder? My forum is in the main htdocs directory and there is no "forum" folder

    if you see index.php (relating to vanilla) in htdocs and you see /htdocs/themes

    then

    by virtue of that fact your forum folder is the root folder / ( i.e. htdocs)

    I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.

  • @peregrine said:
    by virtue of that fact your forum folder is the root folder / ( i.e. htdocs)

    So that means my vanillaforums .htaccess is missing? or what?

  • edited May 2014

    It means you can't have another application in the root which has it's own htaccess file.

    You either make the root the forum and nothing else or put it in a folder or a subdirectory called forum.

    This is how it should look like

    root -> forum folder->or root->subdirectory->forum folder

  • @vrijvlinder said:
    It means you can't have another application in the root which has it's own htaccess file.

    You either make the root the forum and nothing else or put it in a folder or a subdirectory called forum.

    This is how it should look like

    root -> forum folder->or root->subdirectory->forum folder

    Is there a way i can just modify the current .htaccess to work with vanilla? The current file is just my own .htaccess file and some additions from CPANLE. It should be okay to just add the vanillas htaccess file into my current one right? Also if i don't have a .htaccess file for vanilla, and that is where it gets the url to use in email notifications, then how is it getting my old domain name to send out in the email? and how is my site working at all?

  • edited May 2014

    htaccess only affects the links , that is why your email link is not working and probably others too.

    You could try to add the contents of the vanilla htaccess file inside the one in your root. But it will affect any php files you have or files called index.php .

    You really should not have the vanilla forum files outside of their own folder.If you have other stuff in there.

    The htaccess file is generated like the conf.php when you install vanilla and if there is one there it will not generate one as far as I know. I could be wrong. But it is not a file that comes with the download.

  • @vrijvlinder said:
    htaccess only affects the links , that is why your email link is not working and probably others too.

    You could try to add the contents of the vanilla htaccess file inside the one in your root. But it will affect any php files you have or files called index.php .

    You really should not have the vanilla forum files outside of their own folder.If you have other stuff in there.

    lol my links and forum all work perfectly fine. My only problem is that I want to encourage using the new domain name, and the notification emails send a url for my old domain name (both domains work) I want to know where I can replace which url gets sent in the email.

  • edited May 2014

    You could try this in your Locale. if it is english and enabled then change it in there or make your own locale.php and add it to the conf folder.

            $Definition['EmailWelcomeRegister'] = 'You have successfully registered for an account at {Title}. Here is your information:
    
              Username: {User.Name}
              Email: {User.Email}
    
            You can access the site at {/,exurl,domain}.';
    
    $Definition['EmailWelcomeConnect'] = 'You have successfully connected to {Title}. Here is your information:
    
      Username: {User.Name}
      Connected With: {ProviderName}
    
    You can access the site at {/,exurl,domain}.';
    
    $Definition['PasswordRequest'] = 'Someone has requested to reset your password at %2$s. To reset your password, follow this link:
    
      %3$s
    
    If you did not make this request, disregard this email.';
    $Definition['EmailNotification'] = '%1$s
    
    Follow the link below to check it out:
    %2$s
    
    Have a great day!';
    $Definition['EmailStoryNotification'] = '%1$s
    
    %3$s
    
    ---
    Follow the link below to check it out:
    %2$s
    
    Have a great day!';
    

    as you can see there are a few places to change this. You could also look for it in your database the forum address assigned. Maybe that is a red herring....

  • peregrineperegrine MVP
    edited May 2014

    look in your config.php on the NEW forum and see if anything references your old forum's name (location)
    which it shouldn't since you have a new forum location.

    and which version of vanilla are you using.

    is there something related to domain in your config.php

    you might want to post your config.php (remove any passwords,etc that you don't want to be seen publicly).

    I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.

  • @peregrine said:
    look in your config.php on the NEW forum and see if anything references your old forum's name (location)
    which it shouldn't since you have a new forum location.

    and which version of vanilla are you using.

    is there something related to domain in your config.php

    you might want to post your config.php (remove any passwords,etc that you don't want to be seen publicly).

    looked in there. Used a search and there were no references. I think i'll try the locale. I'm using 2.1

Sign In or Register to comment.