php - Url-rewriting with multiple parameters

249

DirectoryIndex /home.php

RewriteEngine On
RewriteCond %{HTTPS} !on
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI}

RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^product/([0-9]+) product.php?id=$1&product_name=$2 [L,QSA]

	
RewriteEngine On
RewriteBase /
RewriteCond %{THE_REQUEST} ^[A-Z]{3,}\s([^.]+)\.php [NC]
RewriteRule ^ %1 [R=301,L]
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME}.php -f
RewriteRule ^(.*?)/?$ $1.php [NC,L]



ErrorDocument 404 /404.php
ErrorDocument 403 /403.php



People are also looking for solutions to the problem: filter_sanitize_string deprecated
Source

Share


Didn't find the answer?

Our community is visited by hundreds of web development professionals every day. Ask your question and get a quick answer for free.


Similar questions

Find the answer in similar questions on our website.

197 php - Url-rewriting with multiple parameters
221 php - CakePHP 3 Multiple isUnique allowing NULL duplicate
303 web scraping - How can I scrape a page and extract all linked resources' urls in php?
934 httpd.conf - Change default url php
278 PHP Paypal IPN listener failing with multiple items only not individual items
11 mongodb - Multiple $group mongo request PHP
517 PHP : Sometimes CURL not return any content
848 Why do I need array() in PHP, if PHP is a dynamic/weakly typed language?
304 php - Symfony2 multiple select tags from one entity
701 php - How to generate absolute URL path to a script file?

People are also looking for solutions to the problem: php - Display same random key several times in a post

Source

Didn't find the answer?

Our community is visited by hundreds of web development professionals every day. Ask your question and get a quick answer for free.

Ask a Question

Write quick answer

Do you know the answer to this question? Write a quick response to it. With your help, we will make our community stronger.

Similar questions

Find the answer in similar questions on our website.