0

We have a site under development which works fine locally, however when uploaded to our server using the permalink settings %postname% the correct URLs are rendered in the menu but in all pages other than home no WP theme URL is output

for example: http://distinctivepeople.co.uk/wp/ works fine http://distinctivepeople.co.uk/wp/who-we-are/ does not output the theme directory so renders unstyled HTML

This works fine under default settings p?=123 etc but we need proper URLs.

This is hosted with 123-reg who don't believe there is a server issue - previously similar has happened if .htaccess is not being read by the server but I'm told this is not the case.

Any help appreciated!

14
  • How have you included your stylesheet link? Commented Oct 14, 2016 at 15:16
  • It's a css problem, look at your source code, it's look like the theme path wasn't set.
    – Benoti
    Commented Oct 14, 2016 at 15:19
  • <link rel="stylesheet" href="<?php bloginfo('template_directory'); ?>/assets/css/dp.css" media="all" /> Commented Oct 14, 2016 at 15:19
  • it is set. as above, see the homepage - works fine, also works on these pages under default permalink settings but not for custom settings Commented Oct 14, 2016 at 15:20
  • it's getting the index file from the root instead of any files from the theme directory when these permalink settings are set Commented Oct 14, 2016 at 15:25

1 Answer 1

0

This was resolved with the help of @AndyMacaulay-Brook

The htaccess had some incorrect (non-wp declarations) which when removed solved the issue:

<IfModule mod_rewrite.c> 
RewriteEngine On 
RewriteBase / 
RewriteRule ^index\.php$ - [L] 
RewriteCond %{REQUEST_FILENAME} !-f 
RewriteCond %{REQUEST_FILENAME} !-d 
RewriteRule . /index.php [L] 
</IfModule> 

# BEGIN WordPress 
<IfModule mod_rewrite.c> 
RewriteEngine On 
RewriteBase /wp/ 
RewriteRule ^index\.php$ - [L] 
RewriteCond %{REQUEST_FILENAME} !-f 
RewriteCond %{REQUEST_FILENAME} !-d 
RewriteRule . /wp/index.php [L] 
</IfModule> 
# END WordPress 

Removing everything outside of the WP declarations fixed the issue

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.