1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Permalinks, Redirect 301 and Link Structure

Discussion in 'Installation and General Troubleshooting' started by carlo75, Oct 20, 2009.

  1. carlo75

    carlo75 Design & Development

    Have you thought about what to do with the permalinks?

    It can be useful a plugin, will let decide what structure adopt for permalinks in hotaru... structure of permalinks Pligg is something like that:

    site.ext/category/some-words-or-title
    or
    site.ext/story.php?title=some_words_or_title
    or some customized else...

    For a new production site there are no big problems; but for a porting, there are a lots of problems to check... like a 404 page and penalization on search engine.

    What do you think about a plugin that manage clean and friendly urls?
     
  2. Nick

    Nick Well-Known Member

    Try this:

    Go to Admin -> Settings and set Friendly Urls to true. Make sure you've renamed the htaccess_default file to .htaccess and edited it with your site's url info.

    Let us know if you encounter any problems.
     
    carlo75 likes this.
  3. carlo75

    carlo75 Design & Development

    oops haven't see that...

    perfect Nick,
    but I have some misunderstood with capital initial letter in categories:

    Technology (pligg production) i.e. is different by technology (hotaru)

    but in local I can't do lot of test, htaccess in vista is a nightmare...however, I think all working in a production site... thank you again!
     
    Last edited: Oct 20, 2009
  4. Nick

    Nick Well-Known Member

    Guess what? I'm doing everything in Windows Vista! :eek: I'm using WampServer. Works well, even with htaccess.

    I see your point about uppercase vs lowercase category names, but the important thing is the pages load with both so your links and Google results *should* still be okay.

    I'll move this thread into the Core forum now.
     
  5. carlo75

    carlo75 Design & Development

    Me too using WampServer,
    but htaccess give me a lot of problems...

    I'll try to shot a fresh installation of Wamp, and checking all configuration parameters in htaccess, then I will update this post.
     
  6. Nick

    Nick Well-Known Member

    If it helps, this is what my the settings part of my local .htaccess file looks like:

    Code:
    ##### 404 Error Begin #####
    ## If Hotaru is installed in a subfolder, change the below line to ErrorDocument 404 /name-of-subfolder/404error.php
    ErrorDocument 404 /404error.php
    ##### 404 Error End #####
    
    ##### Re-directing Begin #####
    Options +Indexes +FollowSymlinks
    RewriteEngine on
    ## If Hotaru is installed in a subfolder, change the below line to RewriteBase /name-of-subfolder
    RewriteBase /hotaru/branches/0.7
    ## If installed in a subfolder you may need to add ## to the beginning of the next line
    ## RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /.*index\.php\ HTTP/
    
    ## Remove these two lines if you have a sub-domain like  http://bookmarking.myhotarusite.com  or http://localhost
    ## Keep if your site url looks like http://www.myhotarusite.com
    ## RewriteCond %{HTTP_HOST} !^www\.
    ## RewriteRule ^\/?(.*)$ http://www.%{HTTP_HOST}/$1 [R=301,L]
    ##### Re-directing End #####
     
  7. carlo75

    carlo75 Design & Development

    Hi Nick, fresh installation done.
    Now: home page (1st) works well, but when I click on a [read more], I'm redirect on a page of hotaru without story, only header and sidebar.

    When I try to navigate on page (hotaru/pg/2), same thing happens
     
  8. Nick

    Nick Well-Known Member

    That sounds like it's not recognizing the .htaccess file.

    For comparison, here's my folder structure:

    C:\wamp\www\hotaru\branches\0.7\admin_index.php
    C:\wamp\www\hotaru\branches\0.7\index.php
    C:\wamp\www\hotaru\branches\0.7\.htaccess

    etc.

    Please post your folder structure and the first section of your .htaccess folder so I can take a look. Thanks.

    EDIT: I've set the demo site to use friendly urls, so you can see it working there.
     
  9. carlo75

    carlo75 Design & Development

    Ok Nick:

    C:\wamp\www\hotaru\admin_index.php
    C:\wamp\www\hotaru\index.php
    C:\wamp\www\hotaru\.htaccess
    ...

    the EDIT section of my htaccess are:

    Code:
    ##### Re-directing Begin #####
    Options +Indexes +FollowSymlinks
    RewriteEngine on
    ## If Hotaru is installed in a subfolder, change the below line to RewriteBase /name-of-subfolder
    RewriteBase /hotaru
    ## If installed in a subfolder you may need to add ## to the beginning of the next line
    ## RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /.*index\.php\ HTTP/
    
    ## Remove these two lines if you have a sub-domain like  [url]http://bookmarking.myhotarusite.com[/url]  or [url]http://localhost[/url]
    ## Keep if your site url looks like [url]http://www.myhotarusite.com[/url]
    ## RewriteCond %{HTTP_HOST} !^www\.
    ## RewriteRule ^\/?(.*)$ http://www.%{HTTP_HOST}/$1 [R=301,L]
    ##### Re-directing End #####
    and yes, hotaru demo working correctly I see...
     
  10. Nick

    Nick Well-Known Member

    Hmm... I don't know! :eek:

    Make sure you have rewrite_module checked in the Apache modules menu in Wamp, but I think you already do, otherwise you would get 500 Internal Server errors.

    I'll give this some thought.
     

Share This Page