diff options
| author | spider@app1 <spiderr@bitweaver.org> | 2016-06-22 15:58:09 -0400 |
|---|---|---|
| committer | spider@app1 <spiderr@bitweaver.org> | 2016-06-22 15:58:09 -0400 |
| commit | 64cc51f511cab79be5951611fa82bb8d7ecd24a5 (patch) | |
| tree | 8794b4b4e428672b07be4b3d9a652e1588ce80b0 /.htaccess | |
| parent | cdf761f5cbc123ce58b5f417f1ffb32e6ab5ed85 (diff) | |
| download | users-64cc51f511cab79be5951611fa82bb8d7ecd24a5.tar.gz users-64cc51f511cab79be5951611fa82bb8d7ecd24a5.tar.bz2 users-64cc51f511cab79be5951611fa82bb8d7ecd24a5.zip | |
add route friend mod_rewrite
Diffstat (limited to '.htaccess')
| -rw-r--r-- | .htaccess | 18 |
1 files changed, 12 insertions, 6 deletions
@@ -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> |
