Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Cannot view subfolder contents in browser
#14
In root
Code:
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d [OR]
RewriteCond %{REQUEST_URI} =/
RewriteRule ^(.*)$ /getsimple/$1 [L]

In /getsimple

Code:
...
RewriteBase /

## For blog plugins
RewriteRule ^post/([^/.]+)/?$ /getsimple/index.php?id=index&post=$1 [L]
RewriteRule ^tag/([^/.]+)/?$ /getsimple/index.php?id=index&tag=$1 [L]
RewriteRule ^page/([^/.]+)/?$ /getsimple/index.php?id=index&page=$1 [L]
RewriteRule ^archive/([^/.]+)/?$ /getsimple/index.php?id=index&archive=$1 [L]
RewriteRule ^category/([^/.]+)/?$ /getsimple/index.php?id=index&category=$1 [L]


## GS rule
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule /?([A-Za-z0-9_-]+)/?$ /getsimple/index.php?id=$1 [QSA,L]

And make sure your siteurl in settings does not have the subpath as recommended.

Then you can stick real static files and directories in root and they will work, just be careful about interfering with slug names. That is what the -f -d is, rewrite if not a actual file or directory name.

This gives you a nice clean site with

/staticfiles.html
/staticdirectories/
/getsimple
NEW: SA Admin Toolbar Plugin | View All My Plugins
- Shawn A aka Tablatronix
Reply


Messages In This Thread
RE: Cannot view subfolder contents in browser - by shawn_a - 2013-05-29, 23:33:14



Users browsing this thread: 1 Guest(s)