HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials

HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials (http://www.howtoforge.com/forums/index.php)
-   Server Operation (http://www.howtoforge.com/forums/forumdisplay.php?f=5)
-   -   mod rewrite htaccess (http://www.howtoforge.com/forums/showthread.php?t=15471)

tera7 11th September 2007 20:05

mod rewrite htaccess
 
Hi i just try to make my urls simpler for the search engines but i dont manage to get it work.
i searched all the info to the internet so i have properly changed httpd.conf
my error log for apache doesnt have something and my htaccess is like this:

Options +FollowSymLinks
RewriteBase /
RewriteEngine On
RewriteRule ^details/([0-9]+)/$ /details.php?id=$1 [PT]

but it doesnt work although when i try to edit a redirect it works fine.
any suggestion?
Thanks.

falko 12th September 2007 20:31

Please put the RewriteEngine On line before all other rewrite directives.

tera7 12th September 2007 23:04

No nothing i have made a lot of experiments with htaccess and httpd.conf but nothing worked i also installed a regexp rpm to my server nothing i tried to edit a htaccess with no regex stuff and dont work but redirections work i am totally confused this happens to my two linux dedicated servers and to my xp xamp pc.


the original link is like :http://www.domain.com/details.php?id=217643

where details of course is a php script.

i also tried 5 different mod rewrite rules generators for my htaccess.

sjau 12th September 2007 23:12

I'd try this:

Code:

RewriteEngine On
RewriteRule ^details/([0-9]+)$ details.php?id=$1 [PT]

I use those two rules for myself:
Code:

RewriteEngine On

RewriteRule ^pId/([A-Za-z0-9]+)/id/([A-Za-z0-9]+)/production.png$ production.php?pId=$1&id=$2

RewriteRule ^pId/([A-Za-z0-9]+)/id/([A-Za-z0-9]+)/graph.png$ graph.php?pId=$1&id=$2


tera7 13th September 2007 01:09

SOLVED!


stupid mistakes to my scripts sorry.


All times are GMT +2. The time now is 00:47.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.