Home
04
Jun
2006
apache .htaccess rewriterule
Redirect to www
History / Edit / PDF / EPUB / BIB / 1 min read (~88 words)apache .htaccess rewriterule
Options +FollowSymLinks
RewriteEngine on
RewriteCond %{HTTP_HOST} ^your-domain-here\.com
RewriteRule ^(.*)$ http://www.your-domain-here.com/$1 [R=permanent,L]
This code placed in your .htaccess will give you the possibility to send any visitor coming to your-domain-here.com to www.your-domain-here.com. This has a great advantage especially with search engines because all your pages will be referenced under the same "subdomain" as if you had both, you'd get www.your-domain-here.com links and your-domain-here.com links which would count as different pages.
Categories
- Anki (1)
- Artificial General Intelligence (6)
- Artificial Intelligence (6)
- Computer Science (1)
- Computers (6)
- Data (1)
- DevOps (1)
- Finances (1)
- General (14)
- Investing (1)
- Learning (11)
- Machine learning (6)
- Note taking (4)
- OCR (1)
- PHP (4)
- Problems (27)
- Processes (34)
- Programming (12)
- Python (10)
- Questions (91)
- Sites (3)
- Software (1)
- Software development (26)
- Space (1)
- Task management (4)
- Teamwork (2)
- Time management (1)
- Time series (3)
- Tool (2)
- Visual Studio Code (4)