A2 Hosting Forums

Full Version: RoR rewrites in cPanel not working
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
We are currently working with cPanel to correct a bug that is not creating rewrites properly when created through the cPanel interface.

As soon as cPanel fixes this bug we will update the servers.  Until that time, you can edit the .htaccess file and add the following so your application will redirect properly to it's assigned port.

For a primary domain:

Replace yourdomain.com with your domain name and the "XXXXX" with the port number listed in cPanel.

RewriteEngine on

RewriteCond %{HTTP_HOST} ^yourdomain.com$ [OR]
RewriteCond %{HTTP_HOST} ^www.yourdomain.com$
RewriteRule ^(.*)$ http://127.0.0.1:XXXXX%{REQUEST_URI} [P,QSA,L]

For a subdomain:

Replace yourdomain.com with your domain name and the "XXXXX" with the port number listed in cPanel.

RewriteEngine on

RewriteCond %{HTTP_HOST} ^yourdomain.com$ [OR]
RewriteCond %{HTTP_HOST} ^www.yourdomain.com$
RewriteRule ^(.*)$ http://127.0.0.1:XXXXX%{REQUEST_URI} [P,QSA,L]
Reference URL's