Forum Moderators: phranque

Message Too Old, No Replies

mod_rewrite and url with "?"

CMS with dynamic URLs to search engine friendly URLs

         

szumski

7:26 pm on Mar 14, 2005 (gmt 0)

10+ Year Member



Hello all
I am using Apache/1.3.29 + mod_rewrite + .htaccess and I have a news system (CMS) on my webpage.

Every new news (messages) have 10 numbers on url and looks for example something like:

[domain.com...]
or
[domain.com...]

I am just trying to rewrite a url that looks like this:

[domain.com...]
or
[domain.com...]

I put it into the .htaccess many rewrite code, but It just didn't work.
Please help my, how do it?
Many thank

jdMorgan

10:10 pm on Mar 14, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



szumski,

Welcome to WebmasterWorld!

This recent thread [webmasterworld.com], particularly the general discussion of friendly URL rewrites, will probably be quite helpful.

Jim

szumski

10:37 pm on Mar 14, 2005 (gmt 0)

10+ Year Member



I put into the .htaccess file, the rewrite code are:

RewriteRule ^index/(.*).php /index.php?id=$1

but It just didn't work :(

jdMorgan

12:02 am on Mar 15, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



What does your server error log say, anything?

Try preceding your code with:


Options +FollowSymLinks
RewriteEngine on

Jim

szumski

8:24 am on Mar 15, 2005 (gmt 0)

10+ Year Member



My server error log say anything.

I put into the .htaccess file, the rewrite code are:

RewriteEngine On
RewriteRule ^/news/(.*) /news.php?id=$1 [NE]

and it just didn't work :(

jdMorgan

2:38 pm on Mar 15, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



You have added a slash before "news" that will not be present in .htaccess.

[b]Options +FollowSymLinks[/b]
RewriteEngine on
RewriteRule [b]^new[/b]s/(.*) /news.php?id=$1 [b][L][/b]

Jim

szumski

3:08 pm on Mar 15, 2005 (gmt 0)

10+ Year Member



didn't work :(