?
Solved

wampserver and htaccess

Posted on 2009-07-08
4
Medium Priority
?
542 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 2000 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

On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

Question has a verified solution.

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

Nothing in an HTTP request can be trusted, including HTTP headers and form data.  A form token is a tool that can be used to guard against request forgeries (CSRF).  This article shows an improved approach to form tokens, making it more difficult to…
Since pre-biblical times, humans have sought ways to keep secrets, and share the secrets selectively.  This article explores the ways PHP can be used to hide and encrypt information.
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.
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 …
Suggested Courses

752 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