Using htaccsess Generator URL Friendly SEO PHP

0 votes
using hidden variable i  created a friendly url 


Options +FollowSymLinks -MultiViews


RewriteEngine on
RewriteBase /

RewriteRule ^([^/]+)/([^/]+)/([^/]+)/(.*)$ index.php?lang=$1&page=$2&detail=$3 [L,QSA,NC]
RewriteRule ^([^/]+)/([^/]+)/(.*)$ index.php?lang=$1&page=$2 [L,QSA,NC]
RewriteRule ^([^/]+)/(.*)$ index.php?lang=$1 [L,QSA,NC] 

php file:

$_GET['lang']); // en
$_GET['page']); // page
$_GET['detail']); // detail.html

So, the page return error status 500, but show me the content

Feb 26, 2022 in Others by Kichu
• 19,040 points
610 views

1 answer to this question.

0 votes
Options +FollowSymLinks -MultiViews
RewriteEngine on
RewriteBase /

# skip all files and directories from rewrite rules below
RewriteCond %{REQUEST_FILENAME} -d [OR]
RewriteCond %{REQUEST_FILENAME} -f
RewriteRule ^ - [L]

RewriteRule ^([^/]+)/([^/]+)/([^/]+)/(.+)$ index.php?lang=$1&page=$2&detail=$3 [L,QSA]
RewriteRule ^([^/]+)/([^/]+)/(.+)$ index.php?lang=$1&page=$2 [L,QSA]
RewriteRule ^([^/]+)/(.+)$ index.php?lang=$1 [L,QSA]


just use this code for your solution 
answered Feb 27, 2022 by narikkadan
• 63,600 points

Related Questions In Others

0 votes
0 answers

SEO friendly url using php

I wanted to use php to make ...READ MORE

Feb 18, 2022 in Others by Kichu
• 19,040 points
963 views
0 votes
1 answer

Writing SEO friendly url gets infinite loop asp.net

you should know that regex avoid cases ...READ MORE

answered Feb 11, 2022 in Others by narikkadan
• 63,600 points
815 views
0 votes
1 answer

nginx clean url with seo friendly file names

server {     listen 80;     server_name example.com;     root   /full/server/path/to/your/cms;     index  index.php;     location / ...READ MORE

answered Feb 14, 2022 in Others by narikkadan
• 63,600 points
990 views
0 votes
1 answer

Can an "SEO Friendly" url contain a unique ID?

beware you can get penalised for duplicate ...READ MORE

answered Feb 17, 2022 in Others by narikkadan
• 63,600 points
554 views
0 votes
1 answer

mod_rewrite seo friendly url passed as parameter only works with prefix on url

RewriteEngine On RewriteRule ^content/get_content.php\?url\=seo-friendly-url$ /content/seo-friendly-url [L] try this code ...READ MORE

answered Feb 24, 2022 in Others by narikkadan
• 63,600 points
1,786 views
0 votes
1 answer

mod_rewrite seo friendly url passed as parameter only works with prefix on url

RewriteEngine On RewriteRule ^content/get_content.php\?url\=seo-friendly-url$ /content/seo-friendly-url [L] try this code ...READ MORE

answered Feb 27, 2022 in Others by narikkadan
• 63,600 points
687 views
0 votes
0 answers

ErrorDocument 404 /404.php is not working in .htaccess file in PHP

This is the Content of my .htaccess file is: ErrorDocument ...READ MORE

Jun 21, 2022 in PHP by narikkadan
• 63,600 points
840 views
0 votes
1 answer

Enabling SEO Optimizer in Magento 1.7 returns 404 error page on frontend links

Modified Magento's stock .htaccess to fit my ...READ MORE

answered Feb 10, 2022 in Others by narikkadan
• 63,600 points
622 views
0 votes
1 answer

Generator URL Friendly SEO PHP with .htaccess

Options +FollowSymLinks -MultiViews RewriteEngine on RewriteBase / # skip all ...READ MORE

answered Feb 14, 2022 in Others by narikkadan
• 63,600 points
4,469 views
0 votes
1 answer

PHP Convert String to SEO Friendly Url For Bengali Language Type

$string = preg_replace("/[^a-z0-9]/u", "$separator", $string);  change the ...READ MORE

answered Feb 14, 2022 in Others by narikkadan
• 63,600 points
1,147 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP