Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

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

share|improve this question
    
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 May 31 '12 at 12:50

1 Answer 1

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.

share|improve this answer
    
Thank you! I had a typo for site URL: lc.doc, not lc.loc.. –  Carl May 31 '12 at 16:59

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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