summaryrefslogtreecommitdiff
path: root/.htaccess
diff options
context:
space:
mode:
authorspider@app1 <spiderr@bitweaver.org>2016-06-22 15:58:09 -0400
committerspider@app1 <spiderr@bitweaver.org>2016-06-22 15:58:09 -0400
commit64cc51f511cab79be5951611fa82bb8d7ecd24a5 (patch)
tree8794b4b4e428672b07be4b3d9a652e1588ce80b0 /.htaccess
parentcdf761f5cbc123ce58b5f417f1ffb32e6ab5ed85 (diff)
downloadusers-64cc51f511cab79be5951611fa82bb8d7ecd24a5.tar.gz
users-64cc51f511cab79be5951611fa82bb8d7ecd24a5.tar.bz2
users-64cc51f511cab79be5951611fa82bb8d7ecd24a5.zip
add route friend mod_rewrite
Diffstat (limited to '.htaccess')
-rw-r--r--.htaccess18
1 files changed, 12 insertions, 6 deletions
diff --git a/.htaccess b/.htaccess
index 8d9f070..e9006f0 100644
--- a/.htaccess
+++ b/.htaccess
@@ -3,12 +3,18 @@
# Uncomment this if mod_rewrites are not working for you. some hosting services have cranky mod_rewrite
# RewriteBase /users/
-# These should pass existing files on through, but do not for some reason. needs to be debugged,
-# and then \. can be added to regex's below
-# RewriteCond %{DOCUMENT_ROOT}%{SCRIPT_FILENAME} -f [OR]
-# RewriteCond %{DOCUMENT_ROOT}%{SCRIPT_FILENAME}/index.php -f
-# RewriteRule ^/.* - [L]
+ # default route catcher for *.php in package dir
+ RewriteCond %{DOCUMENT_ROOT}/%{REQUEST_URI}.php -f
+ RewriteRule ^(.*?)$ $1.php [L,QSA]
+ # pass directories through
+ RewriteCond %{DOCUMENT_ROOT}/%{REQUEST_URI} -d
+ RewriteRule ^ - [L,QSA]
+
+# rule to support users/view/alan
RewriteRule ^view/([-A-Za-z0-9_]+)$ index.php?home=$1 [L,QSA]
- RewriteRule ^([-A-Za-z0-9_]+)$ index.php?home=$1 [L,QSA]
+
+# rule to support users/grace
+ RewriteRule ^([-A-Za-z0-9_]+)$ index.php?home=$1 [L,QSA]
+
</IfModule>