How to convert a page address into a sub-domain url?
Moderator: General Support Moderators
Forum rules
Forum Rules
Absolute Beginner's Guide to Joomla! <-- please read before posting, this means YOU.
Forum Post Assistant - If you are serious about wanting help, you will use this tool to help you post.
Windows Defender SmartScreen Issues <-- please read this if using Windows 10.
Forum Rules
Absolute Beginner's Guide to Joomla! <-- please read before posting, this means YOU.
Forum Post Assistant - If you are serious about wanting help, you will use this tool to help you post.
Windows Defender SmartScreen Issues <-- please read this if using Windows 10.
-
- Joomla! Apprentice
- Posts: 8
- Joined: Fri Dec 30, 2011 9:52 am
How to convert a page address into a sub-domain url?
Hi guys I am trying to make this work but still no results. I have my blog at mypage.com/blog so I used
RewriteRule ^/blog/(.*)$ http://blog.mypage.com/$1 [R=301,L]
but nothing actually happened. Do you have any suggestions?
thank you
RewriteRule ^/blog/(.*)$ http://blog.mypage.com/$1 [R=301,L]
but nothing actually happened. Do you have any suggestions?
thank you
Last edited by imanickam on Thu Jul 19, 2018 3:14 am, edited 1 time in total.
Reason: Split from the topic f=712&t=960073. In the future, for your issues, please create separate topics. Even though the symptom of the problem may be the same, the cause could be different as the environments are different.
Reason: Split from the topic f=712&t=960073. In the future, for your issues, please create separate topics. Even though the symptom of the problem may be the same, the cause could be different as the environments are different.
- Webdongle
- Joomla! Master
- Posts: 44093
- Joined: Sat Apr 05, 2008 9:58 pm
Re: How to convert a page address into a sub-domain url?
No need to make a rewrite rule. Create a menu item of type eternal url.
http://www.weblinksonline.co.uk/
https://www.weblinksonline.co.uk/updating-joomla.html
"When I'm right no one remembers but when I'm wrong no one forgets".
https://www.weblinksonline.co.uk/updating-joomla.html
"When I'm right no one remembers but when I'm wrong no one forgets".
-
- Joomla! Apprentice
- Posts: 8
- Joined: Fri Dec 30, 2011 9:52 am
Re: How to convert a page address into a sub-domain url?
well if I create menu item with this link blog.mypage.com then nothing will happen as there is nothing in the subdomain folder. or did I missed something?
thank you
thank you
- Webdongle
- Joomla! Master
- Posts: 44093
- Joined: Sat Apr 05, 2008 9:58 pm
Re: How to convert a page address into a sub-domain url?
why nothing in it when you want to redirect to it?mainspring wrote:well if I create menu item with this link blog.mypage.com then nothing will happen as there is nothing in the subdomain folder. or did I missed something?
thank you
http://www.weblinksonline.co.uk/
https://www.weblinksonline.co.uk/updating-joomla.html
"When I'm right no one remembers but when I'm wrong no one forgets".
https://www.weblinksonline.co.uk/updating-joomla.html
"When I'm right no one remembers but when I'm wrong no one forgets".
-
- Joomla! Apprentice
- Posts: 8
- Joined: Fri Dec 30, 2011 9:52 am
Re: How to convert a page address into a sub-domain url?
i need all articles in blog to look like this:
blog.mysite.com/article1
instead of
www.mysite.com/blog/article1
blog.mysite.com/article1
instead of
www.mysite.com/blog/article1
- Per Yngve Berg
- Joomla! Master
- Posts: 30936
- Joined: Mon Oct 27, 2008 9:27 pm
- Location: Romerike, Norway
- Webdongle
- Joomla! Master
- Posts: 44093
- Joined: Sat Apr 05, 2008 9:58 pm
Re: How to convert a page address into a sub-domain url?
If (on www. site.com) you create a menu item type external url ... then the link will redirect site.com/blog to blog.site.com. Whichever way you redirect you will need something in blog.site.com
http://www.weblinksonline.co.uk/
https://www.weblinksonline.co.uk/updating-joomla.html
"When I'm right no one remembers but when I'm wrong no one forgets".
https://www.weblinksonline.co.uk/updating-joomla.html
"When I'm right no one remembers but when I'm wrong no one forgets".
-
- Joomla! Apprentice
- Posts: 8
- Joined: Fri Dec 30, 2011 9:52 am
Re: How to convert a page address into a sub-domain url?
I need only one installation of joomla so I though I can do this with .htaccess where I would redirect all links to mysite.com/blog to blog.mysite.com anyone knows how to do it?
thank you
thank you
- Per Yngve Berg
- Joomla! Master
- Posts: 30936
- Joined: Mon Oct 27, 2008 9:27 pm
- Location: Romerike, Norway
Re: How to convert a page address into a sub-domain url?
It's not supported by Joomla. You need the extension a linked to in my previous post.mainspring wrote:I need only one installation of joomla so I though I can do this with .htaccess where I would redirect all links to mysite.com/blog to blog.mysite.com anyone knows how to do it?
- Webdongle
- Joomla! Master
- Posts: 44093
- Joined: Sat Apr 05, 2008 9:58 pm
Re: How to convert a page address into a sub-domain url?
Whatever method you use to redirect mysite.com/blog to blog.mysite.com then you need content in blog.mysite.com. That is because once the browser is redirected to blog.mysite.com it will try to read blog.mysite.com.mainspring wrote:I need only one installation of joomla so I though I can do this with .htaccess where I would redirect all links to mysite.com/blog to blog.mysite.com anyone knows how to do it?
thank you
I suspect that you want the url to say blog.mysite.com but still be reading mysite.com/blog. If that is the case then:
At the top of the .htaccess of mysite.com have
Code: Select all
# This allows you to redirect mysite.com/blog to blog.mysite.com
Redirect /blog/* http://blog.mysite.com
Code: Select all
<iframe src="mysite.com/blog"></iframe>
That will allow the url to be blog.mysite.com without you moving your blog from inside Joomla.
You will need to try it to see if you can return to Home (or other page in mysite.com) to see if mysite.com is shown in the url. (It should do but if it doesn't then you might need a .htaccess in blog.mysite.com to redirect everything except /blog back to myblog.com.)
Note that the folder for the subdomain (blog.mysite.com) needs to be:
1. In the same folder as your Joomla's configuration.php
and
2. The folder that the subdomain (blog.mysite.com) points to should not be called 'blog'.
http://www.weblinksonline.co.uk/
https://www.weblinksonline.co.uk/updating-joomla.html
"When I'm right no one remembers but when I'm wrong no one forgets".
https://www.weblinksonline.co.uk/updating-joomla.html
"When I'm right no one remembers but when I'm wrong no one forgets".
- digitalkube
- Joomla! Apprentice
- Posts: 24
- Joined: Sat Aug 11, 2018 6:32 pm
- Location: India
- Contact:
Re: How to convert a page address into a sub-domain url?
This redirect rule should work properly:
Flush cache after creating the rule and then try to visit the URL.
Code: Select all
RewriteRule ^/blog/(.*)$ http://blog.mypage.com/$1 [R=301,L]
-
- Joomla! Fledgling
- Posts: 2
- Joined: Fri Aug 10, 2018 11:51 am
Re: How to convert a page address into a sub-domain url?
In that case, Joomla Redirection Components allow you to easily convert a page address into a sub-domain URL. You can also repair all broken links.