I have these links on my website:
http://crw4u.be/werkgever.php (I can only add 2 urls in my question, since i'm a n00b)
I added a code to htaccess so I can access these pages without the php:
It works fine with this code:
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^([^\.]+)$ $1.php [NC,L]
Yet I use certain forms in my php files:
<form name="planning" enctype="multipart/form-data" method="post" action="email/index.php">
And I'm getting errors when sending the form with the added code in htaccess:
Not Found. The requested URL /email/ was not found on this server.
Does anyone knows how to adapt this code? I've been searching and testing, but can't seem to solve this.
Highly appreciated!
Tomas
Add this code also, It will let you to access directories.
Try this Rule:-
Here is basic description for how rules are working:-
Regular Expressions
Using regular expressions, it is possible to search for all sorts of patterns in URLs and rewrite them when they match
Flags
Flags are added to the end of a rewrite rule to tell Apache how to interpret and handle the rule. They can be used to tell apache to treat the rule as case-insensitive, to stop processing rules if the current one matches, or a variety of other options. They are comma-separated, and contained in square brackets. Here's a list of the flags, with their meanings.
Exceptions and Special Cases
Rewrite conditions can be tested in a few different ways - they do not need to be treated as regular expression patterns, although this is the most common way they are used. Here are the various ways rewrite conditons can be processed:
Hope it will help you :)