I need help writing a .htaccess mod rewrite file for the following types of url's: http://www.mysite.com/forum/detail.php?page=10_24_14_85 http://www.mysite.com/forum/index.php?page=10_15_0_0
This should get you started, though as Nintendo said, it would help if you told us how you wanted the URLs to look like. Option +FollowSymLinks <IfModule mod_rewrite.c> RewriteEngine on RewriteBase /forum/ RewriteRule ^detail/(.+)/? detail.php?page=$1 [L] RewriteRule ^page/(.+)/? index.php?page=$1 [L] </IfModule> Code (markup):
I received this error when I appliead this to the .htaccess: Internal Server Error The server encountered an internal error or misconfiguration and was unable to complete your request. Please contact the server administrator, and inform them of the time the error occurred, and anything you might have done that may have caused the error. More information about this error may be available in the server error log. Additionally, a 500 Internal Server Error error was encountered while trying to use an ErrorDocument to handle the request.
I would like the index.php to look something like below index.php?page=10_15_0_0 to index.php?category_name.html Here's a snipet I use to pull in the cat name for the meta title: <?php echo getCategoryName($url['category_id']); ?> Would this work in .htaccess? I want a similar outcome for details.php
Sorry, I wrote "Option" instead of "Options" Options +FollowSymLinks <IfModule mod_rewrite.c> RewriteEngine on RewriteBase /forum/ RewriteRule ^detail/(.+)/? detail.php?page=$1 [L] RewriteRule ^page/(.+)/? index.php?page=$1 [L] </IfModule> Code (markup): If you want to do it by category name: Options +FollowSymLinks <IfModule mod_rewrite.c> RewriteEngine on RewriteBase /forum/ RewriteRule ^detail/(.+)\.html detail.php?category=$1 [L] RewriteRule ^page/(.+)\.html index.php?category=$1 [L] </IfModule> Code (markup): And then search by name using $_GET['category'] in the PHP script or however your app accesses GET vars.
All that happened is that is added this [dbid=b00f1f7d75ebdd28e2eba5e6d1b51b9c] to all links and I think even dropped my PR
dbid=b00f1f7d75ebdd28e2eba5e6d1b51b9c ? Is that an obscurely named session ID? BTW, if it is a session ID, using mod_rewrite or not would not affect whether it appears in most cases. I use this to disable it in .htaccess (requires PHP running as Apache module): php_value session.use_cookies 1 php_value session.use_only_cookies 1 php_value session.use_trans_sid 0 Code (markup):