Solved

wampserver and htaccess

Posted on 2009-07-08
4
530 Views
Last Modified: 2013-12-13
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
Comment
Question by:andygee1
  • 2
  • 2
4 Comments
 
LVL 8

Expert Comment

by:yfastud
ID: 24805155
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
 
LVL 1

Author Comment

by:andygee1
ID: 24805483
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
 
LVL 8

Accepted Solution

by:
yfastud earned 500 total points
ID: 24805928
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
 
LVL 1

Author Comment

by:andygee1
ID: 24806117
That did it.  THANKS!!!
0

Featured Post

Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

Join & Write a Comment

When it comes to showing a 404 error page to your visitors, you do not want that generic page to show, and you especially do not want your hosting provider’s ad error page to show either. In this article, I will show you how to enable the custom 40…
This article discusses four methods for overlaying images in a container on a web page
The viewer will learn how to count occurrences of each item in an array.
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

747 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now