mirror of https://github.com/phanan/htaccess.git
Rewording @alexweissman fork
This commit is contained in:
parent
16d6f760bb
commit
08aa008540
|
@ -109,9 +109,8 @@ Redirect 301 / http://newsite.com/
|
||||||
This way does it with links intact. That is `www.oldsite.com/some/crazy/link.html` will become `www.newsite.com/some/crazy/link.html`. This is extremely helpful when you are just "moving" a site to a new domain. [Source](http://css-tricks.com/snippets/htaccess/301-redirects/)
|
This way does it with links intact. That is `www.oldsite.com/some/crazy/link.html` will become `www.newsite.com/some/crazy/link.html`. This is extremely helpful when you are just "moving" a site to a new domain. [Source](http://css-tricks.com/snippets/htaccess/301-redirects/)
|
||||||
|
|
||||||
### Alias "Clean" URLs
|
### Alias "Clean" URLs
|
||||||
|
This snippet lets you use "clean URLs" -- those without a PHP extension, e.g. `example.com/users` instead of `example.com/users.php`.
|
||||||
``` apacheconf
|
``` apacheconf
|
||||||
# This snippet lets you use "clean URLs", without a PHP extension.
|
|
||||||
# Example: "example.com/users" => "example.com/users.php"
|
|
||||||
RewriteEngine On
|
RewriteEngine On
|
||||||
RewriteCond %{SCRIPT_FILENAME} !-d
|
RewriteCond %{SCRIPT_FILENAME} !-d
|
||||||
RewriteRule ^([^.]+)$ $1.php [NC,L]
|
RewriteRule ^([^.]+)$ $1.php [NC,L]
|
||||||
|
|
Loading…
Reference in New Issue