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.

Link to comment
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
Link to comment
Share on other sites

 Share

×
×
  • Create New...