Redirects to Internal Drupal Pages

This article assumes the following: 

  • You are part of the uoWeb team
  • You have access and credentials to the QA server "milkyway" and know its IP address
  • You have downloaded, and are familiar with the command line tool CYGWIN
  • You have access to JIRA  and GitLab

Step 1: Create an incident in JIRA

Step 2: You must have access to "milkway" (QA server)

  • In Cygwin
  • In folder ~/server-config-nginx
  • $git checkout master
  • $git pull origin master
  • You will be prompted for password
  • Your local files will be replaced

Step 3: Create a new branch out of master add JIRA Issue number and your name to the branch name

  • $git checkout –b WEB-1234–ljoshua
  • $git branch –a  (this is to view all branches, the one in green is the one you are in)
  • $git status (status of current branch)

Step 4: On local system go to your redirect folder.

  • In Windows explorer go to C:\cygwin\home\ljoshua\server-config-nginx\qa\milkiway\nginx\redirects 

Step 5: Locate the redirect file to edit

  • If the redirect is part of the domain locate the file
  • For others go to the specific redirect file e.g. file
  • Open the file with editor like Net Beans or Notepad to make the change
  • Do a search for the URL you wish to redirect (e.g. to add a redirect for a page for uottawacard site called commuter)
  • Add the new redirect rewrite ^/uottawacard/commuter(/.*)?$ permanent ;

Step 6: After updating the redirect file, upload to milkyway

  • Use WinSCP to upload new redirect page to milkyway

Step 7: Restart milkyway

  • Open CYGWIN
  • #ssh
  • You will be prompted for password
  • $sudo prep
  • You will be prompted for password again
  • $sudo service nginx reload

Step 8: In order to test redirect in qa server, modify your host file

  • Open browser type in URL to be redirect
  • Also test URL with / at the end as well

Step 9: Once tested in milkyway, use CYGWIN to push branch

  • $git status (you should see a red message indicating the is modified)
  • $git add *
  • $git commit –m WEB-1234-ljoshua
  • $git push origin WEB-1234-ljoshua

Step 10: Add merge request in GitLab

  • Go to add LDAP credentials 
  • Under project webcms/uottawa_core
  • Go to Activity to see new Push events
  • Add link to activity “Create Merge Request Link”
  • Fill in the New Merge Request form with details of the change
  • Assign to uoWeb team member to verify if it should be accepted
    Public cible: 
  • Développeurs
  • Soutien
  • Tutoriels
Haut de page