Search
 
SCRIPT & CODE EXAMPLE
 

PHP

remove .php from url

# Apache Rewrite Rules
 <IfModule mod_rewrite.c>
  Options +FollowSymLinks
  RewriteEngine On
  RewriteBase /

# Add trailing slash to url
  RewriteCond %{REQUEST_FILENAME} !-f
  RewriteCond %{REQUEST_URI} !(.[a-zA-Z0-9]{1,5}|/|#(.*))$
  RewriteRule ^(.*)$ $1/ [R=301,L]

# Remove .php-extension from url
  RewriteCond %{REQUEST_FILENAME} !-d
  RewriteCond %{REQUEST_FILENAME}.php -f
  RewriteRule ^([^.]+)/$ $1.php 

# End of Apache Rewrite Rules
 </IfModule>
Comment

remove % in url in php

<?php
    // Decode the Encoded URL
    $input = "http%3A%2F%2Fway2tutorial.com%2F";
    $input = urldecode($input);

    // Output http://way2tutorial.com/
    echo $input;
?>
Comment

PREVIOUS NEXT
Code Example
Php :: array should not be empty php 
Php :: mac os change the php verison 
Php :: laravel return data from model to another controller 
Php :: array_search 
Php :: confirm password validation in laravel 
Php :: laravel add utility class 
Php :: php string only letters 
Php :: join cakphp 
Php :: factorial program in php using recursive function 
Php :: php current page url 
Php :: print url in view yii2 
Php :: migrate only one table laravel 
Php :: where laravel function 
Php :: php if string contains 
Php :: PHP strtoupper() Function 
Php :: pdo bindparam string 
Php :: php echo alot of html 
Php :: Warning: mysqli_fetch_all() expects parameter 1 to be mysqli_result, bool given in C: ewxammphtdocslearnindex.php on line 11 
Php :: php check if date is older than 1 month 
Php :: php echo 
Php :: laravel Filesystem chmod(): Operation not permitted 
Php :: get header respnse code php curl 
Php :: eloquent model sort by ascending order 
Php :: php json_decode without quotes 
Php :: eloquent get distinct 
Php :: laravel get current action name 
Php :: send mail test from laravel 
Php :: php append to csv 
Php :: wordpress get the product images 
Php :: Allowed memory size of 1610612736 bytes exhausted (tried to allocate 4096 bytes) in phar:///usr/local/bin/composer/src/Composer/DependencyResolver/RuleWatchGraph.php on line 52 
ADD CONTENT
Topic
Content
Source link
Name
5+1 =