2013-05-27, 06:06:22
I have a subfolder of content that I want to link to directly, but I only see the homepage. Is there a modification in .htaccess I would have to do?
(2013-05-27, 18:23:02)Connie Wrote: [ -> ]when don't you see the pages?
In the browser or when you try to set the link?
Any URL?
#Allows .html extension for page links (used with Custom Permalink in admin settings)
RewriteRule /?([A-Za-z0-9_-]+).html$ index.php?id=$1 [QSA,L]
(2013-05-27, 23:34:33)shawn_a Wrote: [ -> ]You should put your gs in a subfolder, and not mix static content in with it.
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d [OR]
RewriteCond %{REQUEST_URI} =/
RewriteRule ^(.*)$ /getsimple/$1 [L]
(2013-05-28, 00:18:22)shawn_a Wrote: [ -> ]Thats what I do.
I have a website with static content and a gs subfolder.
Then a htaccess in root and in gs sub ( which has to have the subpath added ot its rewrite rule.)
something like
Code:RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d [OR]
RewriteCond %{REQUEST_URI} =/
RewriteRule ^(.*)$ /getsimple/$1 [L]
Everything in GS will appear to be in root.
Keeps it clean and upgrades easily.
RewriteRule /?([A-Za-z0-9_-]+)/?$ /getsimple/index.php?id=$1 [QSA,L]
(2013-05-28, 02:04:20)shawn_a Wrote: [ -> ]It should not only the path in your rewrite rule.
eg.
Code:RewriteRule /?([A-Za-z0-9_-]+)/?$ /getsimple/index.php?id=$1 [QSA,L]
RewriteBase /get-simple/
RewriteRule ^post/([^/.]+)/?$ index.php?id=index&post=$1 [L]
RewriteRule ^tag/([^/.]+)/?$ index.php?id=index&tag=$1 [L]
RewriteRule ^page/([^/.]+)/?$ index.php?id=index&page=$1 [L]
RewriteRule ^archive/([^/.]+)/?$ index.php?id=index&archive=$1 [L]
RewriteRule ^category/([^/.]+)/?$ index.php?id=index&category=$1 [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule /?([A-Za-z0-9_-]+)/?$ /get-simple/index.php?id=$1 [QSA]
#Allows .html extension for page links (used with Custom Permalink in admin settings)
RewriteRule /?([A-Za-z0-9_-]+).html$ /get-simple/index.php?id=$1 [QSA,L]
RewriteBase /get-simple/
RewriteRule ^post/([^/.]+)/?$ index.php?id=index&post=$1 [L]
RewriteRule ^tag/([^/.]+)/?$ index.php?id=index&tag=$1 [L]
RewriteRule ^page/([^/.]+)/?$ index.php?id=index&page=$1 [L]
RewriteRule ^archive/([^/.]+)/?$ index.php?id=index&archive=$1 [L]
RewriteRule ^category/([^/.]+)/?$ index.php?id=index&category=$1 [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
#RewriteRule /?([A-Za-z0-9_-]+);(d+)/?$ index.php?id=$1&page=$2 [QSA]
RewriteRule /?([A-Za-z0-9_-]+)/?$ index.php?id=$1 [QSA,L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d [OR]
RewriteCond %{REQUEST_URI} =/
RewriteRule ^(.*)$ /getsimple/$1 [L]
...
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]
(2013-05-29, 23:33:14)shawn_a Wrote: [ -> ]In root
Code:RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d [OR]
RewriteCond %{REQUEST_URI} =/
RewriteRule ^(.*)$ /getsimple/$1 [L]
In /getsimple
Code:...
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
-- 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
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