Hi,
I have built a dynamic site with php and I'm new to URL rewriting. I want to rewrite every URL on my site.
Example :
www.domain.com/example.php?id=300 TO www.domain.com/example/300
So how can I do that ???
Thanks
RyanDev
0
Newbie Poster
Recommended Answers
Jump to Posthere's what you need to do.
first, create a .htaccess
2.write this on the file
ErrorDocument 404 /example/3.save the .htaccess on the example folder
4. the example folder should have an index.php so when they go to www.domain.com/example/300 which is not actually …
Jump to PostAlthough that's a nice work-around, I'd still want to see a full-blown rewriting process (read "how-to").
I'll give it a shot:RewriteRule ^/example.php?id=([0-9]+)$ /example/$1 [L]
Did I nail it?
All 6 Replies
MooGeek
16
Posting Whiz
nevvermind
RyanDev
0
Newbie Poster
sam-i-am
0
Newbie Poster
nevvermind
MooGeek
16
Posting Whiz
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.