Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Category links redirect back to home page #3

Closed
atomicbird opened this issue Mar 13, 2013 · 4 comments
Closed

Category links redirect back to home page #3

atomicbird opened this issue Mar 13, 2013 · 4 comments

Comments

@atomicbird
Copy link

I installed Kirby following its instructions, and then added Baseblog by replacing Kirby's assets, content, and site directories with Baseblog's. I haven't made any other changes to the Kirby code.

If I click on one of the category links in Baseblog's sample content directory, I get redirected back to the site home page (HTTP 302 and a Location: header). For example:

curl -v http://localhost/blog/category:Tools
* About to connect() to localhost port 80 (#0)
*   Trying 127.0.0.1...
* connected
* Connected to localhost (127.0.0.1) port 80 (#0)
> GET /blog/category:Tools HTTP/1.1
> User-Agent: curl/7.24.0 (x86_64-apple-darwin12.0) libcurl/7.24.0 OpenSSL/0.9.8r zlib/1.2.5
> Host: localhost
> Accept: */*
> 
< HTTP/1.1 302 Found
< Date: Wed, 13 Mar 2013 20:59:29 GMT
< Server: Apache/2.2.22 (Unix) DAV/2 PHP/5.3.15 with Suhosin-Patch mod_ssl/2.2.22 OpenSSL/0.9.8r
< X-Powered-By: PHP/5.3.15
< Location: http://localhost/
< Content-Length: 0
< Content-Type: text/html
< 
* Connection #0 to host localhost left intact
* Closing connection #0

This is with Baseblog commit 5616757 and Kirby commit a242815, both current as of today. I see that http://baseblog.sashtown.de doesn't have this problem-- maybe it's using an older version of Kirby?

@atomicbird
Copy link
Author

Some experimenting shows that changing the home setting in site/config/config.php to something other than blog (e.g. docs) makes category links work, though of course it changes the site home page. (Maybe this is obvious to people with more Kirby experience...). I'm not sure why this is (apparently) not the case at http://baseblog.sashtown.de

@sashtown
Copy link
Owner

I'm working with a redirect in the .htaccess

RedirectMatch 301 ^/blog/(.*)$ /$1

to avoid those uncool blog/ - parts in the URLs of blog posts. This makes sense, when building a Kirby site with a blog on the home page. Unfortunately it doesn't work on local environments like XAMPP or MAMP. But it'll work fine on a production sever as you can see.

Another option (and surely the better one in case of local testing) is to drop the blog/ - parts within the category links of the blog (and search) templates. I'm gonna fix that asap.

@sashtown
Copy link
Owner

Done.

@atomicbird
Copy link
Author

Thanks, that takes care of it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants