Solved

wampserver and htaccess

Posted on 2009-07-08
4
540 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article discusses four methods for overlaying images in a container on a web page
Introduction This article is intended for those who are new to PHP error handling (https://www.experts-exchange.com/articles/11769/And-by-the-way-I-am-New-to-PHP.html).  It addresses one of the most common problems that plague beginning PHP develop…
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.

724 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