title: URL Rewrite - Not from .htaccess - Magento
body: <p>Looking for a bit of help as ending up going round in circles trying to understand where the problem may lie.</p>
  
  <p>We recently had our magento side on www.domain.com which would shop through rewrite rules as:
  "domain.com/"</p>
  
  <p>This was correct.</p>
  
  <p>However, as we are targeting the UK market, the site being relatively new we decided to buy up the .co.uk domain and make the switch. Making it www.domain.co.uk, this was all changed correctly in the magento database/backend yet this now starts showing:
  "domain.co.uk"</p>
  
  <p>Missing the forward slash on the end.</p>
  
  <p>I have confirmed in the mysql database that the URL has a slash, and have even turned off mod_rewrite from the .htacess, yet there is still a rewrite occurring from somewhere.</p>
  
  <p>It seems like forever since I set this up on the previous site to remove the "http://" and add the forward slash, but I can't remember how or where I set this.</p>
  
  <p>If anyone could point me in the right direction that would be greatly appreciated. </p>
  
  <p>Kind Regards</p>
  
  <p>Edit : Below is the code for rewrite:</p>
  
  <pre><code>&lt;IfModule mod_rewrite.c&gt;
  
  ############################################
  ## enable rewrites
  
      Options +FollowSymLinks
      RewriteEngine on
  
  ############################################
  ## you can put here your magento root folder
  ## path relative to web root
  
      RewriteBase /
  
  ############################################
  ## uncomment next line to enable light API calls processing
  
  #    RewriteRule ^api/([a-z][0-9a-z_]+)/?$ api.php?type=$1 [QSA,L]
  
  ############################################
  ## rewrite API2 calls to api.php (by now it is REST only)
  
      RewriteRule ^api/rest api.php?type=rest [QSA,L]
  
  ############################################
  ## workaround for HTTP authorization
  ## in CGI environment
  
      RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
  
  ############################################
  ## TRACE and TRACK HTTP methods disabled to prevent XSS attacks
  
      RewriteCond %{REQUEST_METHOD} ^TRAC[EK]
      RewriteRule .* - [L,R=405]
  
  ############################################
  ## redirect for mobile user agents
  
      #RewriteCond %{REQUEST_URI} !^/mobiledirectoryhere/.*$
      #RewriteCond %{HTTP_USER_AGENT} "android|blackberry|ipad|iphone|ipod|iemobile|opera mobile|palmos|webos|googlebot-mobile" [NC]
      #RewriteRule ^(.*)$ /mobiledirectoryhere/ [L,R=302]
  
  ############################################
  ## always send 404 on missing files in these folders
  
      RewriteCond %{REQUEST_URI} !^/(media|skin|js)/
  
  ############################################
  ## never rewrite for existing files, directories and links
  
  
      RewriteCond %{REQUEST_FILENAME} !-f
      RewriteCond %{REQUEST_FILENAME} !-d
      RewriteCond %{REQUEST_FILENAME} !-l
  
  ############################################
  ## rewrite everything else to index.php
  
      RewriteRule .* index.php [L]
  
  &lt;/IfModule&gt;
  </code></pre>