php - .htaccess pointing public_html to public_html/folder/ - Not Redirecting -


i want point maindomain subfolder inside public_html

my root structure

->public_html ->all files here (index.php , contact.php , category-images, connect.php ...) ->subfolder (index.php , folder1, folder2 , images , conntect.php) 

now want open

www.mydomain.com open subfolder files.  

i tried

rewritecond %{http_host} ^(www.)?my-domain.com$ [nc] rewritecond %{request_uri} !^/subfolder/ rewritecond %{request_filename} !-f rewritecond %{request_filename} !-d rewriterule ^(.*)$ /pom/$1 rewritecond %{http_host} ^(www.)?my-domain.com$ [nc] rewriterule ^(/)?$ subfolder/index.php [l] 

it works me ..

but when open pages index file

my url goes http://www.my-domain.com/subfolder/productname.php how avoid subfolder.

my images should point

www.my-domain.com/category-images/

you can use rule in /public_html/.htaccess

rewriteengine on rewritebase /  rewritecond %{request_filename} !-f rewritecond %{request_filename} !-d rewriterule ^((?!subfolder/).*)$ subfolder/$1 [nc,l] 

Comments

Popular posts from this blog

Payment information shows nothing in one page checkout page magento -

tcpdump - How to check if server received packet (acknowledged) -