?
Solved

wampserver and htaccess

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

 [eBook] Windows Nano Server

Download this FREE eBook and learn all you need to get started with Windows Nano Server, including deployment options, remote management
and troubleshooting tips and tricks

Question has a verified solution.

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

Build an array called $myWeek which will hold the array elements Today, Yesterday and then builds up the rest of the week by the name of the day going back 1 week.   (CODE) (CODE) Then you just need to pass your date to the function. If i…
Meet the world's only “Transparent Cloud™” from Superb Internet Corporation. Now, you can experience firsthand a cloud platform that consistently outperforms Amazon Web Services (AWS), IBM’s Softlayer, and Microsoft’s Azure when it comes to CPU and …
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.
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

650 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