Page 1 of 1
[SOLVED] mod_rewrite file extension
Posted: Mon Mar 14, 2005 2:35 pm
by miniuzi
I am trying to make the file foo.php or foo.html redirect to foo
I have tired:
Code: Select all
RewriteEngine on
RewriteRule ^(.*)\.(.*)$ $1
Code: Select all
RewriteEngine on
RewriteRule ^(.*).(.*)$ $1
Can someone please help me?
Posted: Mon Mar 14, 2005 3:03 pm
by infolock
i have to admit., that's one of the most interesting questions i've seen in a while, simply because i didn't even know apache could do this.
anyways, i found 4 great links that you should check out.
This one shows basically exactly how to do what you are wanting... Hope it helps out :
URL =
http://scribbling.net/how_scribblingnet ... ternal_ids
This one kinda shows how to do it but by removing the entire filename...
URL =
http://www.pmwiki.org/wiki/Cookbook/CleanUrls
This one came off apache's site. It mainly gives you all the methods of writing a mod_rewrite...
URL =
http://httpd.apache.org/docs/misc/rewriteguide.html
This last one is an online tutorial i found quite interestnig to read. Might help you out a little too...
URL =
http://www.workingwith.me.uk/articles/s ... d_rewrite/
Posted: Mon Mar 14, 2005 3:57 pm
by miniuzi
This did the trick:
Code: Select all
RewriteBase /
RewriteCond %{REQUEST_URI} ^/.*\.html$
RewriteRule ^(.*)\.html /$1 їR,L]
Posted: Tue Mar 15, 2005 7:11 am
by itsmani1
hi there...
i m very new to apache!!!!!
me too want some help in url rewriting can any one help me????