Open nlile opened 7 years ago
I don't follow what you're looking to accomplish. Can you explain with an example of the directory and url layout you are trying to accomplish?
Hey @kicken sorry for not being clear. Basically, I want to use a folder, but I don't want it showing up in the URL.
So, all of my posts about blogs are in folder /blog/
example.com/blog/post1 example.com/blog/post2 example.com/blog/post3
I need the URLs to just be
example.com/post1 example.com/post2 example.com/post3
@kicken I've tried adding
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)/?$ /blog-folder/$1 [NC,L]
and combining
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-l
RewriteRule ^(.*)/?$ blog-folder/index.php [NC,L]
and
RewriteRule ^blog-folder/(.*)$ /$1 [L,R=301]
I'm not familiar with the internal system which is probably why I can't figure out the way htaccess rewrites affect the links.
For organizational purposes, it would be nice to keep all pages in a folder, but I need all my urls to be stripped to just post-name. I've tinkered with the htaccess and can't get mod rewrite to make any changs. Is there a work-around? Or a way to do this that I'm missing?