I am planning to install Aardvark PHP on many of my pages which are currently static. The problem is that new pages created by the script are not customizable. Instead, the script produces http://www.domain.com/index.php?a=page&id=pagetitle where I need to have: http://www.domain.com/pagetitle.htm in order to utilize my established pages. I have been wrestling in vain with this, trying variou mod_rewrite formulas, but nothing seems to work. I would think this is a simple matter, but now I wonder if the script is overwriting my URL's because it is harmful to the script to change them. The more I learn, the more confused I become. Static pages are concrete, I can go to them and make my changes-but a dynamic page doesn't even exist, in the sense of a physical file on my server. Is it dangerous to some scripts to rewrite the URL? What is the best method for navigating this? I have looked at PHP rewrites, but the ones i see are all too complex and not applicable. This is a very simple rewrite...I only want to change the URL's as above without disturbing any other pages or the SE positioning of the pages I plan to convert. So I'm wondering if I'm missing something.
You can try to extract the URL with an extra script and set the various $_GET and $_POST according to what you need b4 you run the actual script..
Wouldn't that break the script? I assume they made it that way for a reason. I think I have source code on it, script is open source, want to take a crack at forking it?
just do a mod_rewrite In your root add a .htaccess file. In the file add this code: RewriteEngine On RewriteRule ^/(.*).htm$ /index.php?a=page&id=$1 I'm pretty sure it is something like that though. You are prolly going to need to see if your server supports mod_rewrites
Yeah, I've been trying that. The problem is that I need to convert pages in several styles: I have pages which are .htm, others .html, and other that are folders. And I have other pages that will be wordpress or static on the same domain that I do not want to rewrite. Best solution would be a mod or plugin for custom permalinks, like Wordpress. This is a pretty widely used script, I think it would be fairly popular if someone wants to give it a shot. @schoash: If you do this, I will get you some high quality links and promote your mod at the support forum if you like. Please PM me and we'll discuss this. Sending PM.
This is what I do... 1. First I modify the .htaccess to lookup a file if a url is not found... Options -Indexes DirectoryIndex index.php index.html index.htm RewriteEngine on RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_FILENAME} !-f RewriteRule ^(.*)$ read.php [L,QSA] PHP: This says "if i can't find it, let read.php try and sort it out". 2. read.php $TheURL = $_SERVER['REQUEST_URI']; $var_array = explode("/",$TheURL); $GotURL = $var_array[1]; //domain.com/url/ //print $GotURL; $articlesql = mysql_query("SELECT *, date_format(DateTime,'%W, %D %M %Y') as DateTime1 FROM project_blog_entry WHERE URL = '" . mysql_real_escape_string($GotURL) . "'"); PHP: So you can see that if you store the urls in the db then you can look them up. May help may not but hope it does.
hi i dont work with database i need something like this domain.com/index.php?q=digitalpoint = domain.com/digitalpoint.html tnx