WordPress.org

Ready to get started?Download WordPress

Forums

mod_rewrite essential? (27 posts)

  1. injinuity
    Member
    Posted 9 years ago #

    I was wondering if mod_rewrite is an integral part of WP.. is it possible to use WP in totality without mod_rewrite as I don't want to password protect pages or directories?

  2. Mark (podz)
    Support Maven
    Posted 9 years ago #

    mod_rewrite is not essential.
    mod_rewrite has nothing to do with password protection.

  3. ColdForged
    Member
    Posted 9 years ago #

    I don't want to password protect pages or directories?

    Just because you use mod_rewrite doesn't imply password protecting pages or directories. You can in an .htaccess but you certainly don't have to.

  4. injinuity
    Member
    Posted 9 years ago #

    so since my host doesnt support mod_rewrite and I am installing WP on my server, what limitation am I going to face on account of not having mod_rewrite enabled?

  5. Cypher
    Member
    Posted 9 years ago #

    You are not going to be able to use the peramlink feature of WP which allows for 'nice' URLs to your posts.

    Rather, posts links will take the shape of <www.yoursite.com/index.php?p=[post-id]>

    Most visitors to your site are not going to care, but having permalinks enabled will make your posts links appear as:
    <www.yoursite.com/2005/03/24/[category]/[post-title]>

    Regards

  6. injinuity
    Member
    Posted 9 years ago #

    Cypher,

    So posts links will take the shape of <www.yoursite.com/index.php?p=[post-id]> ..... but would it be possible to link directly to these links .. I mean can one link to my posts even if it takes this shape?

  7. ShannonStacey
    Member
    Posted 9 years ago #

    http://shannonstacey.com/?p=126

    That's what the link to my most recent entry looks like, because I've never understood mod-rewrite. People link to my entries, and it's not a problem.

  8. Ming
    Member
    Posted 9 years ago #

    Yep, absolutely. Permalink URLs make your links easier to understand and navigate. But the real advantage is that they never need to change. Even if you switch from WordPress to MovableType to Textpattern your link (and everyone's bookmark to that article) will stay the same. Without permalinks you can't guarantee that. But if that's not a problem then don't worry about it, yoursite.com/index.php?p=[post-id] will link/bookmark/etc just fine.

  9. injinuity
    Member
    Posted 9 years ago #

    well its linkable... but then I guess you will lose out on search engine placement... for your keywords will not be indexed by the spiders

  10. ShannonStacey
    Member
    Posted 9 years ago #

    That's definitely a downside, but I've searched mod_rewrite here in the forums for issues others have had, and since I don't know what Apache is, or what .htaccess. is or what mod-rewrite even is, it's a better safe than broken thing for me.

    I love WordPress, but it's very, very hard for some of us "point the mouse and click" kind of people--it's a foreign language to me. So when I have a problem, and I search for the solution here, it's kind of like matching a French phrase to a French phrase. I don't actually know what it means.

    Search engine placement matters to me, though, so thanks for pointing that out. I'll have to look into it.

  11. NuclearMoose
    Member
    Posted 9 years ago #

    Shannon,
    I'll give you my explanation of what this stuff is, and it won't be technical, because I couldn't create a rewrite rule if my life depended upon it.

    Think of a web server as a car. In order to make the car do something, it needs an engine. Apache is web server software that is basically the engine for our virtual car. Looking at a car's engine, we see lots of "must-have" things, like a fuel system and cooling system. However, some cars engines have some addons like a turbocharger to enhance the power and functionality of the engine. Apache, our web server engine, has "must-have" things, and it also has the ability to addon some "nice-to-have" things. Mod_Rewrite is one such addon. Its purpose is to take a set of rules that are supplied by the web owner, and use those rules to process and present links to content within the site.

    As you have seen above, the module takes these more complex and less-friendly links and converts them into something that is more people and search-engine friendly, among other benefits. Now, how does mod_rewrite do this? Where does it get its instructions to do these changes? Part of it is in the very complex code of the software module itself, but the actual "instructions" on how YOU want the links presented are stored in the .htaccess file.

    In WordPress, you can go into the admin panel and have WordPress generate the rewrite rules for you. Then you copy and paste those rewrite rules into the .htaccess file, which lives in the root of your site. Mod_rewrite is smart in that it knows that it must look in the .htaccess file for the rules it needs to generate the friendly URLs for your articles. Or, even easier, you can allow WordPress to update your .htaccess file for you, but more on that later.

    I hope this helps you a bit with the general concept. You truly need not try to understand every detail and fine point of all of this in order to realise the benefits.

    What you must learn is how to create a .htaccess file and how to get WordPress to generate the necessary permalink rules for you. You could also learn how to make the .htaccess file "writable" so that WordPress can update the file with a click of your mouse button. These things are easy to learn and remember. Once you have that down, the rest is all gravy.

  12. ShannonStacey
    Member
    Posted 9 years ago #

    Thank you so much. (Cars, I do know.)

    I figured out how to do the chmod thing (YAY!), but I can't find my htaccess file, and I try not to mess with the WP files when I'm this tired. And hostica has the absolute worst support boards, so I'm still having trouble finding out about this mod_rewrite thing. (Thank goodness for you guys, or I'd have been looking for a high bridge over a shallow river a month ago.)

    Tomorrow I'll figure this out.

    Thanks again.

  13. Kafkaesqui

    Posted 9 years ago #

  14. ShannonStacey
    Member
    Posted 9 years ago #

    It's me again. The only thing I can find in running around my hostica account is ModLogAn, which is shut off. Is that the same as mod_rewrite? http://www.modlogan.org/

    Thank you for being so patient with my dumb questions. :)

  15. Cypher
    Member
    Posted 9 years ago #

    Shannon, that particular program is just a logfile analyzer that tells you about the traffic visiting your website and allows programs wuch Webalizer to create pretty graphs for you.

    Mod_rewrite is a part of the Apache software, this is something that your webhost will have to setup for you, not something you can do yourself ( in most cases ).

    So contact your webhost and ask them to enable/add mod_rewrite capability or have them tell you whether it's already enabled.

    Regards

  16. moshu
    Member
    Posted 9 years ago #

    The easiest way to find out about the mod_rewrite is to create a file thas has this line in it:
    <?php phpinfo(); ?>
    save it as info.php - upload to your server's root and open it in your browser (www.mysite.com/info.php).
    You should see a long page with all kind of info, csroll down till you see the Apache section and check the "loaded modules". It should look something like this.

  17. ShannonStacey
    Member
    Posted 9 years ago #

    mod_rewrite's listed in the loaded modules section. Super!

    Hopefully this is my last annoying question. *g* I've 'unhidden' my files, and I'm still looking.

    Is the actual name of the file htaccess?

  18. moshu
    Member
    Posted 9 years ago #

    .htaccess - with a dot at the beginning

  19. ShannonStacey
    Member
    Posted 9 years ago #

    I know this is going to come as a big shock, but...I broke it.

    I searched for the .htaccess and only found one in my phpBB directory. There didn't seem to be one for WP. So I just made one up. (Probably my first mistake.)

    I took the code the permalinks page told me should be in .htaccess and put it in a notepad file. I saved it as .htaccess and loaded it into the root directory (where WP lives) and renamed it without the .txt. Checked off every available permissions box (it doesn't show me numbers, just boxes). The permalinks page still tells me my htaccess isn't writeable. I tried moving it to the default directory in themes.

    And now I'm getting a url not found if I click on an entry title.

    Was I not supposed to just make one up?

  20. raianoat
    Member
    Posted 9 years ago #

    I sounds like you did everything correct. What are you permissions on the file? you may see something like: 777 or rwxrwxrwx depending on the FTP client you are using.....

  21. Cypher
    Member
    Posted 9 years ago #

    In your Admin setion, go to Manage->Files. On the sidebar, look for ".htaccess (for rewrite rules)" and click on that. Ensure that the file actually contains the information you want/need.

    Regards

  22. ShannonStacey
    Member
    Posted 9 years ago #

    If I click on .htaccess in Manage--> Files I get: You don't have permission to access /wp-admin/templates.php on this server

    I can't find anyplace where I can just assign it a number.

    It has a Read, Write, and Exec checkbox for User, Group, and Other. I have all 9 boxes checked.

    If I right-click and view page info, it will let me see the chmod list, and all three 'W' values seem to be set at 2. It won't let me change them, though. (hostica uses WebShell, if that makes a difference.)

  23. ShannonStacey
    Member
    Posted 9 years ago #

    I'm still getting that error if I click on .htaccess in Manage--> Files, but if I go to the permalinks page, it will update it all for me, and the title links are working on my site, and I've got the nice links now, so I'm happy.

    Thank you, guys for all your help. There are dozens of reasons why WordPress is the best, but this support board is first on the list.

  24. ShannonStacey
    Member
    Posted 9 years ago #

    (Oh, and I'm embarrassed to admit that the permalinks thing wasn't working mostly because when I renamed .htaccess to remove the .txt, I forgot to remove the . )

  25. Cypher
    Member
    Posted 9 years ago #

    Cool Shannon, glad you got it all figured out, the "nice" URL's are purty. :)

    Regards

  26. NuclearMoose
    Member
    Posted 9 years ago #

    w°°T! Good going, Shannon!

    BTW, none of your questions were dumb, crazy, silly, or otherwise. They are just regular questions from someone working hard to learn and understand what is going on. As for your goof over forgetting to remove the dot in the file name, that's NOTHING! On many occasions I've made changes to my CSS, saved the CSS file, then checked my site. Then I would sob because the site had not changed. I would go back to my CSS and double-check, then double-check the double-check, and so on. Everything would look fine. I'd re-save the file, then check my site.

    Nothing. No changes. More sobbing.

    Then, I would realise that I had not UPLOADED the changed CSS file to my server. After the upload, I'd reload my site, and "Bob's-your-uncle" the CSS miraculously worked! So, as you can see, you aren't the only one who likes to cause themselves grief. I do it all the time! :)

    Have fun, and don't hesitate to come back if you have more questions. (Just don't forget to search first! :p )

  27. raianoat
    Member
    Posted 9 years ago #

    That will do it :)

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.