1
votes

I recently make subdomain for my VPS, I want redirect .php in URL

http://bn.domain.com/forum/register.php

I'd like them to be redirected to the appropriate URL:

http://bn.domain.com/anonpanel/

How can I do that?

[Wed Jun 04 20:10:57 2014] [alert] [client 202.62.25.9] /var/www/forum/.htaccess: Invalid command 'RewriteEngine', perhaps misspelled or defined by a module not included in the server configuration [Wed Jun 04 20:11:01 2014] [alert] [client 202.62.25.9] /var/www/forum/.htaccess: Invalid command 'RewriteEngine', perhaps misspelled or defined by a module not included in the server configuration [Wed Jun 04 20:13:01 2014] [alert] [client 114.79.13.26] /var/www/forum/.htaccess: Invalid command 'RewriteEngine', perhaps misspelled or defined by a module not included in the server configuration [Wed Jun 04 20:13:03 2014] [alert] [client 114.79.13.26] /var/www/forum/.htaccess: Invalid command 'RewriteEngine', perhaps misspelled or defined by a module not included in the server configuration

1
Not clear, can you try to clarify your requirement again.anubhava
just redirect domain.com/forum/register.php to domain.com/anonpanelPutra Fajar Hasanuddin

1 Answers

1
votes

You can use this rule in /forum/.htaccess file:

RewriteEngine On
RewriteBase /forum/

RewriteCond %{HTTP_HOST} ^bn\.domain\.com$ [NC]
RewriteCond %{THE_REQUEST} /register\.php[?/\s] [NC]
RewriteRule ^ /anonpanel [L,NC,R]