var sidebar_align = 'right';
var content_container_margin = parseInt('290px');
var sidebar_width = parseInt('270px');
HTACCESS - Need help in Permanent Redirection Issue
as part of my learning, i've encountered the subject htaccess.
there is one issue i wanted to ask and clear about, if it's possible to accomplish.
i have 2 separate domain on the same server.
-country based domain, http://national-site.ph
-regional based domain, http://regional-site.ph
i want to redirect my regional based domain name to a sub-domain of my country based domain.
it's like this,
shall be redirected to
and after redirection, the address bar in the browser shall display
http://regional-site.ph instead of
Hi you use in 301 redirection for details as under:
Header( "HTTP/1.1 301 Moved Permanently" );
Header( "Location: http://www.new-url.com" );
<%@ Language=VBScript %>
Response.Status="301 Moved Permanently"
ASP .NET Redirect
private void Page_Load(object sender, System.EventArgs e)
Response.Status = "301 Moved Permanently";
JSP (Java) Redirect
response.setHeader( "Location", "http://www.new-url.com/" );
response.setHeader( "Connection", "close" );
CGI PERL Redirect
$q = new CGI;
Ruby on Rails Redirect
headers["Status"] = "301 Moved Permanently"
Redirect Old domain to New domain (htaccess redirect)
Create a .htaccess file with the below code, it will ensure that all your directories and pages of your old domain will get correctly redirected to your new domain.
The .htaccess file needs to be placed in the root directory of your old website (i.e the same directory where your index file is placed)
RewriteRule (.*) http://www.newdomain.com/$1 [R=301,L]
Please REPLACE www.newdomain.com in the above code with your actual domain name.
In addition to the redirect I would suggest that you contact every backlinking site to modify their backlink to point to your new website.
thanks... can i try this and apply while using wamp?
or do i need to create a real site, so i may test this functionality?
Yes you use it but make sure which language your site crate like a PHP Or HTML. only for htaccess.
By smrtalex in forum Hosting Security and Technology
Last Post: 08-26-2009, 04:35 AM
By cyberderf in forum Domain Names
Last Post: 05-10-2006, 04:42 PM
By 3-rx in forum Web Design and Content
Last Post: 05-21-2005, 10:00 PM
By webzila in forum Web Design and Content
Last Post: 01-04-2004, 04:06 PM
By Spunky in forum Hosting Security and Technology
Last Post: 05-21-2002, 05:38 AM