?
Solved

How to do file with variable direction to other file using .htaccess ?

Posted on 2013-10-24
1
Medium Priority
?
288 Views
Last Modified: 2013-10-25
Hi,

I would like to request an assistant.

May i know how to put entry in .htaccess to redirect file to other filename ?

Eg:

I would like to redirect any access to the following file using .htaccess:

admin.php?p=help

To just :

admin.php

Appreciates anybody assistant.


Thank you.
0
Comment
Question by:smksa
[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
1 Comment
 
LVL 58

Accepted Solution

by:
Gary earned 2000 total points
ID: 39601355
RewriteEngine On
RewriteCond %{QUERY_STRING} (^|&)p=help(&|$) [NC]
RewriteRule ^ %{REQUEST_URI}/admin\.php [R=301,L,QSA]
0

Featured Post

Is Your Team Achieving Their Full Potential?

74% of employees feel they are not achieving their full potential. With Linux Academy, not only will you strengthen your team's core competencies but also their knowledge of of the newest IT topics.

With new material every week, we'll make sure that you stay ahead of the game.

Question has a verified solution.

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

When it comes to write a Context Sensitive Help (an online help that is obtained from a specific point in state of software to provide help with that state) ,  first we need to make the file that contains all topics, which are given exclusive IDs. …
When crafting your “Why Us” page, there are a plethora of pitfalls to avoid. Follow these five tips, and you’ll be well on your way to creating an effective page.
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 get a basic understanding of what section 508 compliance can entail, learn about skip navigation links, alt text, transcripts, and font size controls.
Suggested Courses

743 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