It has been a while since I last visted.. looks like a few things have changed around here.
I have a domain name pointing to the root directory of my server, and I'm currently checking the HOST_NAME using PHP and redirecting it to the correct folder where the site contents are stored.
For example, mydomain.com is pointing to myserver.com which checks the HOST_NAME and directs the visitor to mydomain.com/website/
What I am trying to do is create a bit of htacess code that will remove the /website/ bit from the URL. For example,
mydomain.com/website/ would actually be displayed in the browser as mydomain.com/
and mydomain.com/website/news/ would be displayed as mydomain.com/news/
I don't have access to the .conf file on the server otherwise that would be the easiest way to sort this out.
Hope that makes sense.
PS. Code so far...
Code: Select all
RewriteEngine on
RewriteBase /
RewriteCond %{HOST_NAME} ^www.mydomain.com$ їOR]
RewriteCond %{HOST_NAME} $mydomain.com$
RewriteCond ${REQUEST_URI} !^/website/(.*)$
RewriteRule ^(.*)$ /website/$1 їL]If anyone knows how to do this I would be very happy.