Home How to use RewriteRule in htaccess using XAMPP

# How to use RewriteRule in htaccess using XAMPP

Greg Ostry
1#
Greg Ostry Published in 2017-12-05 19:40:45Z
 How do I get rid of the folder name using .htaccess and XAMPP. I saved the folder in --> xampp/htdocs/myproject In myproject folder there are an index.php and .htaccess files. RewriteEngine On RewriteBase /myproject/ RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^(.*)$index.php?url=$1 [QSA,L]  index.php 

index

/myproject/contact Is this possible to get rid of this foldername/path using .htaccess ? In this case the /myproject/.
Phl3tch
2#
 RewriteRule ^myproject/(.*)1  This will take any url of the pattern "myproject/whatever" and rewrite it as "whatever". The string (.*) tells .htaccess to take everything after "myproject/" and store it in a backreference, which is referred to in the rewrite portion of the rule as \$1. Hope this helps.