skip to Main Content

Error in htaccess file when clean url of php file – Apache

When I open this page of my website it gives a 500 error: single-portfolio/3/bizdb-business-directory-data-scraping-uk- My .htaccess file: RewriteEngine on RewriteCond %{THE_REQUEST} /([^.]+).php [NC] RewriteRule ^ /%1 [NC,L,R] RewriteCond %{REQUEST_FILENAME}.php -f RewriteRule ^ %{REQUEST_URI}.php [NC,L] RewriteRule ^single-portfolio/([0-9]+)/([0-9a-zA-Z_-]+)$ single-portfolio.php?id=$1&title=$2 [NC,L] Error shown…

VIEW QUESTION

Mod Rewrite – Clean URL with query string not working – Apache

I have the following .htaccess file. <IfModule mod_rewrite.c> Options +FollowSymlinks RewriteEngine On DirectoryIndex api.php FallbackResource index.php RewriteCond %{REQUEST_URI} ^/api RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{QUERY_STRING} ^$ RewriteRule ^/([^/]+)/([^/]+)$ $1/$1.php?endpoint=$2 [L] RewriteRule ^([^/]+)/([^/]+)/([^/]+)$ $1/$1.php?endpoint=$2&id=$3 [L] RewriteRule ^([^/]+)/([^/]+)/([^/]+)/([^/]+)$ $1/$1.php?endpoint=$2&id=$3&endpoint2=$4 [L]…

VIEW QUESTION
Back To Top
Search