Jump to content
Larry Ullman's Book Forums

Recommended Posts

I am trying to use mode_rewrite in my project but it is not working.

 

httpd.conf Settings:

 

 

<Directory "C:/xampp/htdocs/mysite/blog">

AllowOverride All

</Directory>

 

.htaccess Settings:

 

<IfModule mod_rewrite.co>

RewriteEngine on

RewriteBase /mysite/blog/

 

# For article:

RewriteRule ^article/([0-9]+)/?$ article.php?id=$1

 

</IfModule>

 

How can I fix this problem?

Thank you.

Share this post


Link to post
Share on other sites

Have you checked out this previous thread, i was suffering from a could be similar problem:

 

http://www.larryullman.com/forums/index.php?/topic/1732-enabling-url-rewriting-not-working/

 

Things to look out for.

 

1. Make sure the file is of type HTACCESS and not just FILE (So the file will have the period in front .htaccess)

2. Make sure in your httpd.conf that mod_rewrite has the .co extension as my extension was actually .so so it wasn't exactly as the book had stated, all the book logic was 100% correct.

 

I would confirm these two factors to begin with and if its not one of these we can investigate your issue further.

  • Upvote 1

Share this post


Link to post
Share on other sites

Can you paste a full copy of the httpd.conf script (you can edit this down later once we have taken a look). Also what Server are you using, and are you using Mac or Windows?

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
Sign in to follow this  

×
×
  • Create New...