• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 292
  • Last Modified:

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

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
smksa
Asked:
smksa
1 Solution
 
GaryCommented:
RewriteEngine On
RewriteCond %{QUERY_STRING} (^|&)p=help(&|$) [NC]
RewriteRule ^ %{REQUEST_URI}/admin\.php [R=301,L,QSA]
0

Featured Post

How to Use the Help Bell

Need to boost the visibility of your question for solutions? Use the Experts Exchange Help Bell to confirm priority levels and contact subject-matter experts for question attention.  Check out this how-to article for more information.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now