Welcome Guest, Not a member yet? Register   Sign In
Htaccess config to create page redirection
#1

May I know what is the meaning of each lines in htaccess whenever a page is redirected? Thanks

RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php/$1 [L]
Reply
#2

Code:
RewriteEngine On
Enable Apache webserver URL rewrite feature

Code:
RewriteCond %{REQUEST_FILENAME} !-f
If URL is not actual file ...

Code:
RewriteCond %{REQUEST_FILENAME} !-d
... and URL is not actual directory ...

Code:
RewriteRule ^(.*)$ index.php/$1
... then take URL and return output of index.php script instead, using URL as one of attributes for index.php


Here's more detailed explanation of URL rewrite
https://www.addedbytes.com/blog/url-rewr...-beginners
Reply




Theme © iAndrew 2016 - Forum software by © MyBB