.htaccess does not work properly on ubuntu server

RewriteRule    ^profile?$    profile.php    [NC,L]
RewriteRule    ^profile/?$    profile.php    [NC,L]
RewriteRule    ^profile/([0-9]+)/?$    profile.php?profile_id=$1    [NC,L]    # Handle product requests
RewriteRule    ^profile/([0-9]+)/([a-z0-9A-Z]+)/?$    profile.php?profile_id=$1&p=$2    [NC,L]    # Handle product requests
RewriteRule    ^profile/([0-9]+)/([a-z0-9A-Z]+)/([a-z0-9A-Z]+)/?$    profile.php?profile_id=$1&p=$2&id=$3    [NC,L]    # Handle product requests
RewriteRule    ^([a-z]+)/?$    index.php?p=$1    [NC,L]    # Handle product requests

When i open

{url}/profile/{profile_id} 

the request will be profile.php, but profile_id is not available through $ _REQUEST ['profile_id']. All other queries work correctly.

Can someone help what could be a possible cause?

+4
source share
1 answer

Try disabling the MultiViews option according to @ValdimirDimitrov's comment .

-1
source

All Articles