Forum Moderators: coopster
So, you want your web site to consist of only one page?
It would be helpful if you would provide more detail about what you are trying to do.
The simple answer is to use a server-internal rewrite, not an external (301 or 302) redirect.
RewriteRule .* /index.php [L]
Jim
domain.com/index.php?cat=abc&subcat1=def&subcat2=ghi
Now I want to put the parameters like this
domain.com/abc/def/ghi
There is one file that processes the url and selects the content and the template from the database.
Now this file should allways be opened, no matter what URl is typed in.
One way to do it would look like this:
.htaccess:
<Files index>
ForceType application/x-httpd-php
</Files>
domain.com/index/abc/def/ghi
How can I do it, so that index/ does not appear in the URl
RewriteRule ^([^/]*)/([^/]*)/(.*)$ /index.php?cat=$1&subcat1=$2&subcat2=$3 [L]
Reference: Introduction to mod_rewrite [webmasterworld.com]
Jim
[webmasterworld.com...]
But what about the 404 Header send out?
I want to try something similar on a site I'm developing...
My inspiration: [alistapart.com...]
There's a little code snippet in there that might help.
Also, when I was experimenting with my hosting provider none of the rewrite directives worked at all until I added:
Options +FollowSymLinks to my .htaccess file.
I'm not entirely sure why but now they work as expected.
Skitz