Sign up ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

i tried to permanent redirect 301 from to

RewriteEngine On
Options +FollowSymLinks

RewriteCond %{HTTP_HOST} ^test\.example\.com$ [OR]
RewriteCond %{HTTP_HOST} ^www\.test\.example\.com$
RewriteRule ^submitticket\.php\/?(.*)$ "http\:\/\/test\.example1\.com\/contact\.php$1" [R=301,L]

RewriteCond %{HTTP_HOST} ^test\.example\.com$ [OR]
RewriteCond %{HTTP_HOST} ^www\.test\.example\.com$
RewriteRule ^/?$ "http\:\/\/manage\.example1\.com\/" [R=301,L]

but if i set any link like to it won't redirect

so how can i made a permanent redirect files with all extensions and directory included ?


share|improve this question
Is the intent to just redirect for submitticket.php and /, or all links? The config you have will just do those two specific locations. – Shane Madden Dec 27 '11 at 4:06

1 Answer 1

up vote 0 down vote accepted

Create a separate vhost for and put this in the config file:

Redirect permanent /

Remember the trailing slash. This will redirect any request to the other domain, including subfolders, files and such.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.