0

Wordpress is installed locally on WAMP (win 7 x64) and the front page of my site loads fine when I type http://lc.loc. However when I click the link to this URL on the loaded page, I am taken to a DNS fail page that downloads from my DNS host. All the links on the page that start with http://lc.loc/ are broken in this way; if I type them into the address bar they work, if I click that same link on the page I get the DNS 'page not found' error.

I have tried firefox, chrome and IE but the same thing happens in all of them.

mod_rewrite is enabled, and the LoadModule rewrite_module modules/mod_rewrite.so line is uncommented in http.conf, as is Include conf/extra/httpd-vhosts.conf

No .htaccess file was created by wordpress which could be the issue, but I believe I've enabled all the settings it requires to do this. I set the permissions of all the files in the www folder so that 'everyone' had full access. I also manually added an .htaccess file from a fresh wordpress installation I'd made on my shared hosting account, but this hasn't helped.

Virtual host config in httpd-vhosts.conf:

NameVirtualHost *:80
<VirtualHost *:80>
ServerName lc.loc
ServerAlias lc.loc
DocumentRoot "e:/wamp/www/lc"

I've tried changing the permalinks structure to post type, and while this does change the urls of the links successfully, clicking those links still fails in the way described.

hosts file config:

127.0.0.1    lc.loc

I would really appreciate some help in solving this as I have no idea if it's a setting in apache, wordpress or elsewhere.

Thanks, Carl

1
  • Are you sure WP is causing this? My guess would be it has more to do with software you are using and might be better asked at other site of SE network.
    – Rarst
    Commented May 31, 2012 at 12:50

1 Answer 1

0

Check the page's source via your browser. And see if the links have a different "href=xxx" URL from the anchor text.

It's the only explanation unless your pages also have JS that rewrites the URLs on load or in the onclick event.

1
  • Thank you! I had a typo for site URL: lc.doc, not lc.loc..
    – Carl
    Commented May 31, 2012 at 16:59

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.