0

I need to redirect a page like this:

http://example.com/clients/themes?domain=localhost.com 

this link should be redirected to skin.php which is in the same directory.

Can any one help me? Thanks.

1
  • Do you want to redirect to http://example.com/clients/skin.php?domain=localhost.com ? Commented May 24, 2012 at 12:06

1 Answer 1

2

Enable mod_rewrite and .htaccess through httpd.conf and then put this code in your .htaccess under DOCUMENT_ROOT directory:

Options +FollowSymLinks -MultiViews # Turn mod_rewrite on RewriteEngine On RewriteBase / RewriteCond %{QUERY_STRING} ^domain=localhost\.com$ [NC] RewriteRule ^clients/themes/?$ clients/skin.php? [L,NC] 

This will internally forward your request to /clients/skin.php stripping out query string. If you want query string as well then remove ? after skin.php.

Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.