Best unofficial Apache Server developers community |
|
This is hard to explain, so hopefully I'm understood in my question. (1) I want to create "SEO friendly" links that remove the query string from a web site. There is only one variable, let's call it "page". Here is the following code for my .htaccess file.
This works in providing the proper redirect. So /applications/ will send to index.php?page=applications. (2) My index.php will include a view page based on the value of $_GET['page']. Here is some sample code below:
There seems to be no problems so far. (3) Let's make apps.php an exact copy of home.php. home.php loads just fine, but apps.php will not load linked CSS and JScript pages. When apps.php is loaded, it thinks it is in the /apps/ directory. To load the linked pages, I would need to insert a "../" in front of the file name. Then it displays correctly. So my question is-- How can I properly write the .htaccess file so the home.php and apps.php page can be identical files and produce identical results, instead of the apps.php file being treated as if it were in the /apps/ directory?
posted via StackOverflow
|