php - 403 Error - Wordpress link not working when permalink setting is set to 'post name'

281

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
957

Answer

Solution:

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

657

Answer

Solution:

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.

458

Answer

Solution:

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

201

Answer

Solution:

Try flushing your Rewrite Rules with this plugin

443

Answer

Solution:

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.

258

Answer

Solution:

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

People are also looking for solutions to the problem: php - CodeIgniter 'You did not select a file to upload' with ajax

Source

Didn't find the answer?

Our community is visited by hundreds of web development professionals every day. Ask your question and get a quick answer for free.

Ask a Question

Write quick answer

Do you know the answer to this question? Write a quick response to it. With your help, we will make our community stronger.

Similar questions

Find the answer in similar questions on our website.