Mobile app version of vmapp.org
Login or Join
Miguel251

: Naked domain subdirectories/files redirect to root www I have a 301 Redirect setup for my naked domain (something.com) to redirect to the www subdomain (www.something.com). However, I'm running

@Miguel251

Posted in: #301Redirect #Dns #DomainRegistrar #Redirects

I have a 301 Redirect setup for my naked domain (something.com) to redirect to the www subdomain (www.something.com). However, I'm running into an issue I didn't foresee: when someone links to, for example, something.com/thisthing.html, it redirects to something.com/ instead of something.com/thisthing.html, which is what I want. Is there any way to achieve this effect? Thanks for the help!

10.01% popularity Vote Up Vote Down


Login to follow query

More posts by @Miguel251

1 Comments

Sorted by latest first Latest Oldest Best

 

@Mendez628

Try to set as below in your .htaccess file. This should help.

RewriteEngine on
RewriteCond %{HTTP_HOST} ^something.com$ [OR]
RewriteRule ^(.*)$ "http://www.something.com/" [R=301,L]

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme