[x]
Posted via EE Mobile

Search, ask, and monitor your questions on the go with EE Mobile. Visit Experts Exchange from your mobile device and never be out of touch again.

Question
[x]
Attachment Details
[x]
The Solution Rating System

With so many solutions, how can you tell which solutions are most likely to help you and which ones are not? To provide you with a tool to use, we rate our solutions based on various elements that most accurately determine if a solution is a quality solution. To explain what factors affect the solution rating, here are the elements we take into consideration when formulating our solution rating.

  • The Grade of the Solution
  • The Zone Rank of the Expert Providing the Solution
  • The Number of Author and Expert Comments
  • The Number of Experts Contributing
  • The Feedback of the Community

Your Input Matters
Because of the way the system is set up, the most important variable in this equation is you. As a member of Experts Exchange, you are able to cast your vote on the quality of the solutions in regard to how complete, accurate, helpful and easy to understand each solution is. When you provide your feedback, each rating is adjusted accordingly. So, if you see a solution that has a poor rating that you think is a good solution, let us know by rating it. As you do, the rating will be adjusted and will become more accurate for other members of our site.

If you have any suggestions that you would like to make for our rating system, please ask a question in the Suggestions Zone of Community Support.

Thank you!

9.1

Apache Rewrite Rules

Asked by matt_v in WordPress

Tags: Apache Web Server

Hello,
I need some help with a Rewrite rule, please. :)

I am working on a client site...that was originally not setup properly, so I moved allot of stuff around and changed allot of urls in the process.

Sites (incl Google) that used to point to http://www.example.com/blog/archives/1550 now come to 404 error page that I setup.

I need to send everything linking to www.exmp.com/blog/xxxx to be redirected to www.exmp.com/xxxx.

So take the domain name and the trailing xxx, put them together and go there instead of the original request.

I need to accomplish this w/o interfering with the directives that I have already put in the .htaccess file.  All the stuff that I have in there right now refers to issues regarding security, as you will see.

I have tried a few different things like:
RewriteBase /
RewriteCond %{REQUEST_FILENAME} -!-f
RewriteCond %{REQUEST_FILENAME} -!-d
RewriteRule (.*) ^/blog/$ http://www.exmpl.com/$ [R=301,L]

etc, etc, but I really don't know what I'm doing neither do I know how the code I'm trying trying to add is affecting what I already have in there. All I can tell you is, all that I have been able to accomplish are a couple of endless loops and some 500 errors.

However, the code that you see below is working as intended right now...at least from what I can tell. If someone sees something else that I did wrong, please please let me know.

Thanks in advance.

P.S. I'm at my other "real job" right now, so my response may be a slight bit slow... :)
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
29:
30:
31:
32:
33:
34:
35:
36:
37:
38:
39:
40:
41:
42:
43:
44:
45:
46:
47:
48:
49:
50:
51:
52:
Options +FollowSymlinks
Options All -Indexes
 
ErrorDocument 404 /dir/dir/dir/404.php
 
AuthName "Restricted Area" 
AuthType Basic 
AuthUserFile /home/content/s/f/r/h-m/.htpasswd 
AuthGroupFile /dev/null 
<files wp-login.php>
require valid-user
</files>
<files /wp-admin/>
require valid-user
</files>
<files wp-config.php>
Order deny,allow
deny from all
</files>
 
##
## IP Controls to be implemented soon
##
## Please tell me how to limit this IP control to specific folders the way I've 
## done with the <files></files> directive above. I don't want to shutout 
## everyone from the whole site, I want to shut everyone (w/ excp listed)
## to "parts" of the site/folders, based on their IP.
##
#AuthUserFile /dev/null
#AuthGroupFile /dev/null
#AuthName "Access Control"
#AuthType Basic
#<LIMIT GET>
#order deny,allow
#deny from all
#allow from xx.xx.xx.xx
#allow from xx.xx.xx.xx
#</LIMIT>
 
 
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{REQUEST_METHOD} POST
RewriteCond %{REQUEST_URI} .wp-comments-post\.php*
RewriteCond %{HTTP_REFERER} !.*http://www.example.org/.* [OR]
RewriteCond %{HTTP_USER_AGENT} ^$
RewriteRule (.*) ^http://%{REMOTE_ADDR}/$ [R=301,L]
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
[+][-]09/14/09 10:45 AM, ID: 25327638Accepted Solution

View this solution now by starting your 30-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

About this solution

Zone: WordPress
Tags: Apache Web Server
Sign Up Now!
Solution Provided By: caterham_www
Participating Experts: 2
Solution Grade: A
 
[+][-]09/15/09 08:42 AM, ID: 25336129Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]09/15/09 09:40 AM, ID: 25336774Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]09/15/09 10:36 AM, ID: 25337267Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]09/15/09 11:48 AM, ID: 25337957Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]09/15/09 12:11 PM, ID: 25338172Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]09/15/09 01:46 PM, ID: 25339282Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]09/15/09 01:48 PM, ID: 25339314Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]09/15/09 01:54 PM, ID: 25339384Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]09/15/09 02:14 PM, ID: 25339606Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]09/15/09 03:16 PM, ID: 25340203Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
 
Loading Advertisement...
20091111-EE-VQP-92 - Hierarchy / EE_QW_3_20080625