September 5, 201115 yr Hello everyone, I currently have a domain registered with a company and using hosting with another. The problem is when I go to my website it shows the full path. e.g. www.mywebsite.co.uk will resolve to: http://72.42.15.191/~usr/folder/ the ~refers to my hosting username. My main website is listed in a subfolder and has a index.php. the /folder/ listed above is my sub directory in public_html. I believe it has something to do with .htaccess and mod re-writes. At the moment I am using this as a re-write to point the domain to my sub directory. My question is how would I hide the full path so it will only show: www.mywebsite.co.uk/LINK_USER_ClICKS_ON. My current script is: # Do not change this line. RewriteEngine on # Change yourdomain.com to be your primary domain. RewriteCond %{HTTP_HOST} ^(www.)?mywebsite$ # Change 'subfolder' to be the folder you will use for your primary domain. RewriteCond %{REQUEST_URI} !^/SUBFOLDER/ # Don't change this line. RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d # Change 'subfolder' to be the folder you will use for your primary domain. RewriteRule ^(.*)$ /SUBFOLDER/$1 # Change yourdomain.com to be your primary domain again. # Change 'subfolder' to be the folder you will use for your primary domain # followed by / then the main file for your site, index.php, index.html, etc. RewriteCond %{HTTP_HOST} ^(www.)?mywebsite$ RewriteRule ^(/)?$ SUBFOLDER/index.php [L] Thanks
September 5, 201115 yr Try changing this RewriteCond %{HTTP_HOST} ^(www.)?mywebsite$ To RewriteCond %{HTTP_HOST} ^www.mywebsite.com$ Edited September 5, 201115 yr by bocaj
September 6, 201115 yr Author Hello, I tried that and it comes up with "500 Internal Server Error". Do you know why the domain resolves to the full path and shows it anyway? Thanks
Create an account or sign in to comment