• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 547
  • Last Modified:

wampserver and htaccess

I have a couple of sites hosted and we are trying to put a .htaccess file in the root of one of the sites. When we do we get a access denied. The file contains the code listed.  This is running on wampserver 2 with apache 2.2.11 and php 5.2.9


Can you tell me if you see any problems? I have the mod rewrite enabled.


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

Open in new window

0
andygee1
Asked:
andygee1
  • 2
  • 2
1 Solution
 
yfastudCommented:
wordpress auto rewrite url based on url you used to install it, so if you copy that folder from another host instead install new wordpress, you will get forbidden error ;)
0
 
andygee1Author Commented:
Even on the root of the site?  We are putting this file in the root of the site and it's blocking access to root, not just the wordpress root.
0
 
yfastudCommented:
I've just tried it and don't have any problem, but you should put this line in your htaccess
Options +FollowSymlinks
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]

Open in new window

0
 
andygee1Author Commented:
That did it.  THANKS!!!
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Easily Design & Build Your Next Website

Squarespace’s all-in-one platform gives you everything you need to express yourself creatively online, whether it is with a domain, website, or online store. Get started with your free trial today, and when ready, take 10% off your first purchase with offer code 'EXPERTS'.

  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now