valonesal 0 Junior Poster

Ok here is the code I am working with. What im trying to do is pull up pages without showing the subfolders.

ie. http://mywebsite.com/index.php , my http://mywebsite.com/index2.php, http://mywebsite.com/index3.php and so on. Not http://mywebsite.com/folder1/index1.php, it works for one page but not for multiple pages, and im at a complete loss.

Can someone show me how to get it to work with any page in a subfolder. Thank you.

RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_URI} !^/(folder1|folder2|folder3).*$
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /home/name/public_html/folder1/folder2/index.php [L]

Thanks again.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.