Forum Moderators: phranque

Message Too Old, No Replies

Very simply mod_rewrite question

         

OptimusS

2:33 am on Jul 25, 2005 (gmt 0)



how to make this address :
http://www.example.net/include/images.php?image=some_logo.jpg

looks like this :
http://www.example.net/include/images/some_logo.jpg

Thanks in advance and sorry for bad english.

[edited by: jatar_k at 5:39 pm (utc) on July 25, 2005]
[edit reason] no specific urls thanks [/edit]

Jesse_Smith

3:53 am on Jul 31, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Options +Indexes
Options +FollowSymlinks
RewriteEngine on
RewriteBase /
RewriteRule ^include/images/([^.]+)\.jpg$ include/images.php?image=$1 [L]

jd01

7:44 pm on Jul 31, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Hi OptimusS,

Welcme to WebmasterWorld.

Actually, you are going the wrong way, if I understand your question correctly. What you will need to do is change the links on your pages to link to the new URL, then use mod_rewrite to serve information to those locations instead of what would normally be a 404 error.

Here is a slightly longer answer:
[webmasterworld.com...]

Hope this gets you started. When you have something you have tried, post it and we'll help you get it to work.

Justin

Added: Options +stuff only needs to be difined in some cases.
On some servers you will need AllowOverride FileInfo.
RewriteBase is not necessarily necessary.