title: Cake php automatically redirects to port 80
body: <p>I have an instance of cakePHP installad on my local machine. </p>
  
  <p>I use WAMP to run PHP and updated my httpd.conf with these :</p>
  
  <pre><code>Listen 8080
  ServerName localhost:8080
  </code></pre>
  
  <p>I need it on port 8080 so it won't interfere with other apps I use. </p>
  
  <p>The proble is that when I type localhost:8080/application in my browser, it redirect to localhost/application and shows a blank screen. </p>
  
  <p>Here are the 2 .htaccess files that might be relevent. </p>
  
  <p>1- In application root folder : </p>
  
  <pre><code>&lt;IfModule mod_rewrite.c&gt;
  RewriteEngine on
  RewriteRule    ^$ app/webroot/    [L]
  RewriteRule    (.*) app/webroot/$1 [L]
  &lt;/IfModule&gt; 
  </code></pre>
  
  <p>2 - In application/app</p>
  
  <pre><code>&lt;IfModule mod_rewrite.c&gt;
  RewriteEngine On
  RewriteBase /application/app/webroot
  RewriteCond %{REQUEST_FILENAME} !-d
  RewriteCond %{REQUEST_FILENAME} !-f
  RewriteCond %{REQUEST_URI} !^/(app/webroot/)?(img|css|js)/(.*)$
  RewriteRule ^(.*)$ index.php [QSA,L]
  ErrorDocument 404 /404-not-found
  </code></pre>
  
  <p></p>
  
  <p>I've made some research and can't find anything specific to my situation. </p>
  
  <p>Does any of you know what is happening and how I could fix this ?</p>