Mod_rewrite can do at least 100 other things and Ill include some of those in a later blog post. Heres how to redirect subfolder to subdomain usinghtaccess file.
Active 9 years 2 months ago.
Apache redirect domain to subfolder. Apache domain redirect to subfolder. The Create Page Rule dialog opens for your domain. Its a linux system running apache.
A short and straightforward tutorial on how to redirect an old domain to a new domain using the htaccess file on your Apache web server. Once connected upload or create a text file named htaccess with no extension. Save the file by clicking Save Changes Well done.
In order to redirect one directory or subfolder to a different one you should add the following rewrite rule to yourhtaccess file. Apache will check the current directory for an. Otherwise Apache wont apply thehtaccess configuration.
Please make sure you have enabled mod_rewrite in Apache web server before you follow these steps. You can redirect all requests to a subdirectory by adding an htaccess file to the root of your domains directory. Viewed 4k times 1.
Ask Question Asked 9 years 11 months ago. Click the Rules app then click the Page Rules tab. The way they do their setup is your primary domain is the root folder.
When you add a subdomain its in a subfolder of the root which sucks. The Apache HTTP is able to redirect traffic to a specific URL with use of the Apache mod_rewrite. If you actually want to permanently redirect domain1subfolder domain2 then its a simple change in domain1s configuration like this.
Visit the FTP page for instructions on how to upload. Lets take a look at a simple redirection of traffic from to mysubfolder. I have a hosting account with godaddy.
Redirect ALL requests to a domain to a subdirectory. Help i need some help i want to know i want to redirect my old domain to the new domain but i dont want to change the subfolder i mean like this. Options FollowSymLinks RewriteEngine On RewriteRule old-directory 1new-directory2 RL How to Redirect from a Blog Subdomain to a Blog Folder.
Under Page Rules click Create Page Rule. Make sure that the opening of the htaccess file contains the 2 lines of code below which enables the Apache module to rewrite the URLS then place your redirections below them.