J Johnson i love c&y NLC Nov 7, 2008 #1 using .htaccess how would i go about removing the .php from the url, so for example url.com/main.php would be url.com/main
using .htaccess how would i go about removing the .php from the url, so for example url.com/main.php would be url.com/main
Dynash It gets better. NLC Nov 7, 2008 #2 RewriteEngine On RewriteCond %{REQUEST_FILENAME}!-d RewriteCond %{REQUEST_FILENAME}!-f RewriteRule ^([^.]+)\.php$ $1 [L]
RewriteEngine On RewriteCond %{REQUEST_FILENAME}!-d RewriteCond %{REQUEST_FILENAME}!-f RewriteRule ^([^.]+)\.php$ $1 [L]
krakjoe stop staring NLC Nov 7, 2008 #3 Urm, vice versa on the rewrite rule Dynash, so the user browses to /main and gets /main.php
themoose Sup, Recoil here. NLC Nov 13, 2008 #5 RewriteEngine On RewriteRule ^([^.]+)/?$ $1.php?%{QUERY_STRING} [L] I do believe. Or, to make it a tad more secure by only letting certain ones redirect: RewriteEngine On RewriteRule ^(index|contact|register|login|yougetthepicture)/?$ $1.php?%{QUERY_STRING} [L]
RewriteEngine On RewriteRule ^([^.]+)/?$ $1.php?%{QUERY_STRING} [L] I do believe. Or, to make it a tad more secure by only letting certain ones redirect: RewriteEngine On RewriteRule ^(index|contact|register|login|yougetthepicture)/?$ $1.php?%{QUERY_STRING} [L]