Solved

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

Posted on 2013-10-24
1
282 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
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

Efficient way to get backups off site to Azure

This user guide provides instructions on how to deploy and configure both a StoneFly Scale Out NAS Enterprise Cloud Drive virtual machine and Veeam Cloud Connect in the Microsoft Azure Cloud.

Question has a verified solution.

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

Although it can be difficult to imagine, someday your child will have a career of his or her own. He or she will likely start a family, buy a home and start having their own children. So, while being a kid is still extremely important, it’s also …
Does your audience prefer people in photos or no people? How can you best highlight what you’re selling? What are your competitors doing, and what can you do that is different and unique from them?  Continue reading to learn how to make your images …
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.

809 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