How could we hide a directory on the url
Like, http://example.com/lens_galleries/peter-fonda/ to http://example.com/peter-fonda/ internally ie keeping all the html load same.
How could we hide a directory on the url
Like, http://example.com/lens_galleries/peter-fonda/ to http://example.com/peter-fonda/ internally ie keeping all the html load same.
If it's specifically for "peter-fonda" then you can try:
RewriteEngine On
RewriteRule ^peter-fonda/(.*)$ /lens_galleries/peter-fonda/$1 [L]
But if it's for general folders in the "lens_galleries", then you can try something like this:
RewriteEngine On
RewriteCond %{DOCUMENT_ROOT}/lens_galleries/$1 -f [OR]
RewriteCond %{DOCUMENT_ROOT}/lens_galleries/$1 -d
RewriteRule ^(.*)$ /lens_galleries/$1 [L]
In your .htaccess add :
RewriteEngine on
RewriteRule ^peter-fonda/(.*) lens_galleries/peter-fonda/$1 [R=301,NC,L]
if you get css issues use relative path