Mobile app version of vmapp.org
Login or Join
Becky754

: Rewrite root folders to a php file and exclude some folders I want to rewrite all the root folders to mysite.com/index.php?folder=^folder using Apache htaccess. However, I don't want the images

@Becky754

Posted in: #Apache #Htaccess

I want to rewrite all the root folders to mysite.com/index.php?folder=^folder using Apache htaccess.
However, I don't want the images folder to be rewritten.
Like Facebook.

10.01% popularity Vote Up Vote Down


Login to follow query

More posts by @Becky754

1 Comments

Sorted by latest first Latest Oldest Best

 

@Moriarity557

I found the solution:

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} !/subfolder
RewriteRule ^(.*)$ index.php?q= [L,QSA]


Those rules will rewrite all the submits to index.php?q=variable

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme