Solved

.htacces issue

Posted on 2011-02-22
4
224 Views
Last Modified: 2012-08-13
I'm new to .htaccess  and needs assistance. using following code and plugins.php can be accessed like http://sitename/plugins but I have a directory named plugins and want to access it like http://sitename/plugins/ 

Options +FollowSymLinks
Options +Indexes
RewriteEngine on
#RewriteCond %{SCRIPT_FILENAME} !-f
#RewriteRule ^([^\.]+)$ $1.php [NC,L]
0
Comment
Question by:hiddenpearls
[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
4 Comments
 

Expert Comment

by:jtuinstra
ID: 34950013
I am not sure, but I don't think that is possible. As you are refering to the same place. http://sitename/plugins/ is the same as http://sitename/plugins You need to direct to a different name.
0
 

Author Comment

by:hiddenpearls
ID: 34950160
but their should be some differentiate betweek /plugins/ and /plugins
0
 
LVL 6

Expert Comment

by:MatthewP
ID: 34951121
The .+ in your regexp matches 1 or more of anything including a trailing forward slash. Can't you do

RewriteRule ^plugins$

that should do a redirect if the trailing slash isn't present only
0
 
LVL 6

Accepted Solution

by:
MatthewP earned 500 total points
ID: 34951136
\w+ could be used to match word characters only if you need it too (ie wont match the trailing /)
0

Featured Post

Secure Your WordPress Site: 5 Essential Approaches

WordPress is the web's most popular CMS, but its dominance also makes it a target for attackers. Our eBook will show you how to:

Prevent costly exploits of core and plugin vulnerabilities
Repel automated attacks
Lock down your dashboard, secure your code, and protect your users

Question has a verified solution.

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

I imagine that there are some, like me, who require a way of getting currency exchange rates for implementation in web project from time to time, so I thought I would share a solution that I have developed for this purpose. It turns out that Yaho…
It is possible to boost certain documents at query time in Solr. Query time boosting can be a powerful resource for finding the most relevant and "best" content. Of course the more information you index, the more fields you will be able to use for y…
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.

717 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