Solved

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

Posted on 2013-10-24
1
286 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 500 total points
ID: 39601355
RewriteEngine On
RewriteCond %{QUERY_STRING} (^|&)p=help(&|$) [NC]
RewriteRule ^ %{REQUEST_URI}/admin\.php [R=301,L,QSA]
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Please explain purpose of GZIP 4 61
Making exceptions for ValidationAttribute 2 27
Show MP4 file and close (HTA) 3 24
Saving Web Page as PDF 9 47
Developer portfolios can be a bit of an enigma—how do you present yourself to employers without burying them in lines of code?  A modern portfolio is more than just work samples, it’s also a statement of how you work.
Although a lot of people devote their energy toward marketing for specific industries, there are some basic principles that can be applied to any sector imaginable. We’ll look at four steps to take and examine how those steps were put into action fo…
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.
Any person in technology especially those working for big companies should at least know about the basics of web accessibility. Believe it or not there are even laws in place that require businesses to provide such means for the disabled and aging p…

726 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