IndianWebPortal.com

Something Different In Linux

Home » Error and solution » Redirect domain to .cgi file

Redirect domain to .cgi file

Posted by Rishikesh Vispute Categories: Error and solution, htaccess

If you want to redirect your domain

http://domain.co.uk

to

http://domain.co.uk/cgi-bin/test/subdirectory/test.cgi file

then add the following rewrite rule in .htaccess file

====================

Options +FollowSymLinks
RewriteEngine On
RewriteCond %{HTTP_HOST} ^www\.domain\.co\.uk$ [NC]
RewriteRule ^/?$ "http\:\/\/www\.domain\.co\.uk\/cgi-bin\/test\/subdirectory\/test\.cgi$1" [R=301,L]

====================

Or

====================

http://domain.com

to

http://domain.com/cgi-bin/subdirectory/test.cgi

then add the following rewrite rule in .htaccess file

====================

RewriteEngine on
RewriteCond %{HTTP_HOST} ^domain.com$ [OR]
RewriteCond %{HTTP_HOST} ^domain.com$
RewriteRule ^/?$ "http\:\/\/domain\.com\/cgi-bin\/subdirectory\/test\.cgi" [R=301,L]

====================

Done


Popular Posts

remove index.php fro

How to remove index.php from url in magento Ans : If you ...

PHP-Java bridge on p

  What is php-java bridge? The php-java bridge is the php ...

Set expiration for y

If you want to set the expiration to your site ...

Warning: Parameter 1

Error: Warning: Parameter 1 to modMainMenuHelper::buildXML() expected to be a ...

domain pointing to e

If you domain uses external MX record and it is ...