Solved

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

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

Backup Your Microsoft Windows Server®

Backup all your Microsoft Windows Server – on-premises, in remote locations, in private and hybrid clouds. Your entire Windows Server will be backed up in one easy step with patented, block-level disk imaging. We achieve RTOs (recovery time objectives) as low as 15 seconds.

Join & Write a Comment

If your site has a few sections that need to be secure when data is transmitted between the server and local computer, such as a /order/ section for ordering or /customer/ which contains customer data, etc it would of course be recommended to secure…
Any business that wants to seriously grow needs to keep the needs and desires of an international audience of their websites in mind. Making a website friendly to international users isn’t prohibitively expensive and can provide an incredible return…
Viewers will get an overview of the benefits and risks of using Bitcoin to accept payments. What Bitcoin is: Legality: Risks: Benefits: Which businesses are best suited?: Other things you should know: How to get started:
The viewer will learn how to count occurrences of each item in an array.

707 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

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now