Reputation: 4776
my root subfolders are like this
Root (www.example.co.uk)
I want if the user requested example.com to be point to example.com/my_framework (which is with cakephp) but in url shows www.example.com
RewriteEngine on
RewriteCond %{HTTP_HOST} ^example.co.uk$ [NC,OR]
RewriteCond %{HTTP_HOST} ^www.example.co.uk$
RewriteCond %{REQUEST_URI} !example.co.uk/
RewriteRule ^(.*) http://www.example.co.uk/my_framework/$1 [R=301,L]
and also when user wants to see the images in some pages images are in my_images folder so they can have access to see this images.
Upvotes: 1
Views: 149
Reputation: 785108
You can try this rule:
RewriteEngine on
#this OR and third line accept www from url
RewriteCond %{HTTP_HOST} ^(www\.)?glamestates.co.uk$ [NC]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^((?!my_framework/).*)$ /my_framework/$1 [NC,L]
Upvotes: 1