Support » Plugins and Hacks » [Resolved] Anything like Drupal’s Path module to rename URLs?

[Resolved] Anything like Drupal’s Path module to rename URLs?

  • For example, “?page_id=3” isn’t descriptive enough. Drupal has the Path module that allows simple path renaming, which would be more than enough for my development purposes. Something like Pathauto would be nice too, but I don’t care to spend my time setting it up.

Viewing 9 replies - 1 through 9 (of 9 total)
  • Jeremy Clark



    There called permalinks and here are the docs on them.

    This looks promising, but didn’t work for me. I tried pasting the generated rewrite rules into my .htaccess, and even did a chmod 777 to the file and re-set the permalink option (which successfully wrote to the file) but still no luck. And mod_rewrite is available and enabled on my local server. The paths in the Apache rules that WordPress generated seem correct too, and fiddling with them didn’t work.

    Moderator Samuel Wood (Otto)


    WordPress.org Tech Dude

    What were the rules it generated?

    I assure you, Permalinks do work. The generated rules should always be the same, and depend mostly on the location of your blog directory. There’s no need to “fiddle” with them.

    The WordPress rules simply point the rewrite engine to the index.php file. WordPress handles the URL rewrites internally.

    # BEGIN WordPress
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /Sitename/
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /Sitename/index.php [L]
    # END WordPress

    I’ve replaced the actual site root directory with “Sitename” for this contractor’s privacy. Also, this is running over localhost, if that’s of any importance.

    Moderator Samuel Wood (Otto)


    WordPress.org Tech Dude

    Well, that’s correct, and that should pretty much be that.

    What are you getting on the site itself? What is the generated URL for, say, a single page? What are your Permalink settings set to? What happens instead of getting the page you’re expecting?

    Basically, what is “not working” about it?

    These are set to:

    Date and name based
    ยป http://localhost/Sitename/2008/03/25/sample-post/

    If I try to go to the about page (which is where ?page=4 redirects) I get this Apache error:

    Not Found
    The requested URL /Sitename/about/ was not found on this server.

    I’ve gone to my httpd.conf and enabled mod_rewrite system-wide, but no change. I also tried removing the check:
    <IfModule mod_rewrite.c>...</IfModule>
    but without success. And mod_rewrite.so is definitely installed…

    Update: I ran the same script on my remote server and everything is working fine there. I guess my local server is jacked up.

    Apparently, mod_rewrite is loaded (according to $ apache2ctl -M) but I tested Drupal locally, and it too isn’t recognizing the module. I guess I have work to do!

    Problem fixed. I had overly restrictive settings in my httpd.conf for AllowOverride, because I forgot to edit that setting when I last isntalled Apache2.

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘[Resolved] Anything like Drupal’s Path module to rename URLs?’ is closed to new replies.