0

I'm migrating my first Wordpress site to a live server. Eventually the site will have it's own domain name, but for testing purposes I have uploaded it as a folder within my own personal site.

http://connorhome.com/moorfield/

All the pages work except the 'restaurant' page, which throws up a 403 error. The page is fine locally. It is worth noting that this page uses a different template to the other pages.

If I change the permalink structure to 'default', the page loads fine. Does anyone have any ideas of how to fix this? I have read that 'post name' isn't a great way of structure permalinks, but for the sake of this site (which only has a few pages) it is ideal, so I'd like to get it working if possible. Thanks.

This is what my .htaccess file is showing:

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

# END WordPress
7
  • 1
    Do you have anything fancy going on in your .htaccess right now?
    – ಠ_ಠ
    Jul 26, 2013 at 12:13
  • That is not a subdomain.
    – Alxandr
    Jul 26, 2013 at 12:16
  • check when updating permalink there if provide htaccess code at bottom try to replace that in your htacees file or fresh your page several time it may take time to update Jul 26, 2013 at 12:40
  • I'm afraid no code is given when updating permalinks. Jul 26, 2013 at 13:43
  • 1
    Check if you have a physical directory /restaurant on the server without an index page (which in most server configurations would produce an access denied error). I've noticed that you server will autocomplete urls that start with "rest" (connorhome.com/moorfield/rest will redirect to /restaurant) which is usually a sign that a file or dir of that name exists. Jul 29, 2013 at 12:01

6 Answers 6

4
+50

you must have a conflict with the slug 'restaurant', check if you have a post or custom post type item that has the same slug.. also, try to resave the permalinks so as to flush the rewrite rules.. i usually have these problems when i have a custom post type rewritten with the same slug as an existing page

2
  • The NextGen Gallery I was using had a gallery called 'Restaurant' which in turn created a folder in the root called 'restaurant', so the page /restaurant was looking in this folder and finding nothing but images and thumbnails. Deleting the folder and the gallery and renaming the gallery to 'Restaurant Gallery' has solved it. Thanks for the pointer! Jul 29, 2013 at 21:52
  • good to know you had finally had it. When there is a 404 on wordpress pages, usually there is just a conflict somewhere.. Jul 29, 2013 at 22:06
1

Sorry that I cant comment yet since I would have done instead of answering. But I am wondering if 'Restaurant' is a custom taxonomy.

Also, check your trashed pages and posts to see if any pages are there with the same permalink as /restaurant - and if so delete them.

0

Instead of using the rewrite rule, create an actual subdomain via your hosts admin tools. Then, regenerate the .htaccess file. So it will be: moorfield.connorhome.com

0

Try flushing your Rewrite Rules with this plugin

1
  • 2
    Flushing rewrite cache is done automatically by visiting the Permalinks page under Settings.
    – Nic
    Jul 29, 2013 at 16:12
0

make sure rewrite mode enable in your server first check in your server rewrite mode is enabled or not because this errors come only when the rewrite mode not enabled. and in localhost you can enable and apache2 extension rewrite then check it is working on not.

0

Maybe you should reset the permission of your 'restaurant' directory. More detailed info here: http://en.wikipedia.org/wiki/HTTP_403

Your Answer

Reminder: Answers generated by Artificial Intelligence tools are not allowed on Stack Overflow. Learn more

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

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