Hi, Im looking for a way to convert :
www.domain.com/folder/file.php => sub.domain.com/file.php
I havent found any example for this on the forums after searching for quite a while, I'll apreciate some help.
Thank you.
richardk wrote:Do you want the sub domain in the browser's address bar?
Does the sub domain exist? What happens when you got to the sub domain?
Redirect 301 /catalogo http://catalogo.madboxpc.com
richardk wrote:Oh, so you want to redirect users to the new URL (the sub domain).
Try this in a .htaccess file in madboxpc.com's document root
- Code: Select all
Redirect 301 /catalogo http://catalogo.madboxpc.com
richardk wrote:I would have thought a redirect from the old URL to the new URL would be best.
So you want the old URLs to still work without a redirect. Is the sub domain and the main domain on the same server? What are their document roots?
Options +FollowSymLinks
RewriteEngine On
RewriteRule ^catalogo(/(.*))?$ http://catalogo.madboxpc.com/$2 [P,L]
richardk wrote:For the old URLs to stay the same you will need mod_proxy, in a .htaccess file in madboxpc.com/.htaccess
- Code: Select all
Options +FollowSymLinks
RewriteEngine On
RewriteRule ^catalogo(/(.*))?$ http://catalogo.madboxpc.com/$2 [P,L]
Users browsing this forum: No registered users and 3 guests