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?
The following warnings occurred: | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Warning [2] Undefined array key "threadviews_countguests" - Line: 745 - File: showthread.php PHP 8.1.31 (Linux)
|
Cannot view subfolder contents in browser
|
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
when don't you see the pages?
In the browser or when you try to set the link? Any URL?
|--
Das deutschsprachige GetSimple-(Unter-)Forum: http://get-simple.info/forums/forumdisplay.php?fid=18
2013-05-27, 22:07:35
(2013-05-27, 18:23:02)Connie Wrote: when don't you see the pages? http://sic-parvis-magna.com/dansite_v2.0/index.html is what I'm trying to have appear in the browser. No 404 either. I just realized that this line is probably the issue in .htaccess, but I don't know how to create an exception. This is a static subfolder, not anything generated from the CMS. Code: #Allows .html extension for page links (used with Custom Permalink in admin settings)
2013-05-27, 23:34:33
You should put your gs in a subfolder, and not mix static content in with it.
2013-05-28, 00:13:03
2013-05-28, 00:18:22
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 Everything in GS will appear to be in root. Keeps it clean and upgrades easily.
2013-05-28, 00:41:18
(2013-05-28, 00:18:22)shawn_a Wrote: Thats what I do. Thank you for the clarification. Is it easier to reinstall, or would moving my existing setup one folder down require me to hardcode modify any config settings?
2013-05-28, 02:04:20
It should not only the path in your rewrite rule.
eg. Code: RewriteRule /?([A-Za-z0-9_-]+)/?$ /getsimple/index.php?id=$1 [QSA,L]
2013-05-28, 11:08:01
(2013-05-28, 02:04:20)shawn_a Wrote: It should not only the path in your rewrite rule. So I need two htaccess files now? I moved all contents into /get-simple/, and here's the htaccess file: Code: RewriteBase /get-simple/ I'm getting a 403 currently if I don't enter the subdomain in the location bar.
2013-05-28, 22:47:24
Yeah you will need 2 if you want to keep it segregated.
Rewrite base should stay / the other paths need to change
2013-05-29, 09:02:53
I'm halfway there. My root domain works now, as do the blog posts. The only issue is when I click on page links, it still appends the subfolder to the URL after I click the link (the link itself does not show the subfolder).
This is my new subfolder htaccess Code: RewriteBase /get-simple/
2013-05-29, 11:15:45
Rewrite base /
All index.php rules need a subfolder/index.php
2013-05-29, 12:41:59
Finally got the combination right! Thanks for your patience.
2013-05-29, 23:33:14
In root
Code: RewriteCond %{REQUEST_FILENAME} !-f In /getsimple Code: ... 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
2013-05-30, 10:45:59
(2013-05-29, 23:33:14)shawn_a Wrote: In root Your format gave me a 500 error. It seems moving both RewriteCond lines from below the blog rules to above them caused this. Just and FYI, as both of our files are the same content, just differently laid out.
2013-05-30, 11:06:40
Yeah I accidentally moved them and had wrong comments. I fixed it.
|
« Next Oldest | Next Newest »
|