0

My website is rewriting all subdomain links with www. for example

news.example.com

works fine, but if I go to

news.example.com/wp-admin

it will rewrite the URL to

www.example.com/wp-admin

This also happens if you click any links on the site, rather than going to the link you would expect it erases the sub domain portion and replaces with www., None of the images or css is loading also, I assume this is also because of the same issue.

My site is setup on amazon ec2 with elastic IP, I am using NameVirtualHost to separate out the domains via apache. The top level domain is the website running on laravel framework and the sub domain is a wordpress install. I will post my httpd.conf, it might help

NameVirtualHost *:80

<VirtualHost *:80>
ServerAdmin webmaster@example.com
DocumentRoot "/var/www/html/website1_folder"
ServerName example.com
ErrorLog "logs/example.com-error_log"
CustomLog "logs/example.com-access_log" common
</VirtualHost>

<VirtualHost *:80>
ServerAdmin webmaster@example.com
DocumentRoot "/var/www/html/website2_folder"
ServerName subdomain.example.com
ErrorLog "logs/example.com-error_log"
CustomLog "logs/example.com-access_log" common
</VirtualHost>
Jenny D
  • 27,780
  • 21
  • 75
  • 114
CMOS
  • 101
  • 4
  • 4
    Nothing presented so far is really giving any ideas what might happen. If there are no rewrite rules in your httpd.conf or any conf file in conf.d/ directory, try searching .htaccess in your DocumentRoot directory, and post contents of .htaccess file. – Jakov Sosic Jun 15 '14 at 23:56
  • ... assuming that the OP included all of httpd.conf. Is that the case? – dartonw Jun 16 '14 at 01:23
  • Do you have any .htaccess files that contain any rewrite instructions? – Jenny D Jun 16 '14 at 08:07
  • I have no re write rules that I know of, I am using laravel so whatever it comes with is the only thing that could happen, I will look at the htaccess – CMOS Jun 16 '14 at 14:59

0 Answers0