View previous topic :: View next topic |
Author |
Message |
Marty_ -
Joined: 21 Feb 2006 Posts: 55
|
Posted: Wed Oct 31, 2007 1:27 pm Post subject: What am I missing ? |
|
|
I cant get the new URLs to print on my web pages, but they do work.
I'm using an online url-rewrite generator here
I'm entering a directory url that I wanted to rewrite, like so, using dir as a page.
The result is printed as a .htaccess code so, I'm taking Virtual Path Regular Expression as : /dir(.*)-(.*)-(.*)-(.*)\.htm$ and redirecting to /cgi-bin/dir/dir.cgi?action=$1&Search=$2&Cat_ID=$3 with continue to next match.
The predicted result does work if its typed into the address bar. http://www.web-bin.com/dirBrowse-Category-16.htm and or any other number other then 16 in this test, upto 6000+
But what am I missing, I cant get the urls to show on my pages ?
PS: I have done url-rewritting before but those instances involved a .php file do i need to write a htaccess file or php file ? _________________ What is Pay Per Play ?
Last edited by Marty_ on Fri Nov 09, 2007 5:11 pm; edited 1 time in total |
|
Back to top |
|
|
aprelium-beta -
Joined: 24 Jun 2004 Posts: 383
|
Posted: Wed Oct 31, 2007 5:53 pm Post subject: Re: What am I missing ? |
|
|
Marty_,
Try enabling the URL rewriting log file to understand how the rules are executed for your URL. This is usually the best way to find what rule did not work as expected. _________________ Beta Testing Team
Aprelium - http://www.aprelium.com |
|
Back to top |
|
|
Marty_ -
Joined: 21 Feb 2006 Posts: 55
|
Posted: Wed Nov 07, 2007 12:17 am Post subject: |
|
|
OK I tried that but it just confused me even more, however if i explain a little more, would it be possible to write me out an example ?
Basically my web pages produce Full urls :example http*//www.mysite.com/dir.cgi?action=Register as distinct from /dir.cgi?action=Register
I'm trying to get the following to work without success,
-action-(.*)\.html dir.cgi?action=$1 which should produce this http*//www.mysite.com/-action-Register
I'm lost when it comes to adding conditions or base paths, can you help me out ? _________________ What is Pay Per Play ? |
|
Back to top |
|
|
pkSML -
Joined: 29 May 2006 Posts: 952 Location: Michigan, USA
|
Posted: Thu Nov 08, 2007 11:01 pm Post subject: |
|
|
Marty_ wrote: | I'm trying to get the following to work without success,
-action-(.*)\.html dir.cgi?action=$1 which should produce this http*//www.mysite.com/-action-Register
I'm lost when it comes to adding conditions or base paths, can you help me out ? |
I still don't follow you completely.
URL rewriting does not produce links. That would come from your HTML-producing script. Your page can have relative or absolute links, and they work just the same with URL rewriting.
In fact, relative URLs are translated by the user's browser into absolute URLs when requested from a web server.
URL rewriting is just the same as link translation. Your link, when clicked, asks for a resource - for example, /-action-Register. The server receives the request and actually calls dir.cgi?action=Register. So the browser says the user is at /-action-Register, but they're actually receiving the dir.cgi?action=Register page.
The prominent benefit of URL rewriting is cleaner URLs.
Hope that helps! _________________ Stephen
Need a LitlURL?
http://CodeBin.yi.org |
|
Back to top |
|
|
Marty_ -
Joined: 21 Feb 2006 Posts: 55
|
Posted: Fri Nov 09, 2007 10:09 am Post subject: |
|
|
I appreciate your help, however I have no idea why your telling me this and from your explanation it seems your using the url rewriting feature backwards, you don't need to edit your scripts to get the url rewrite feature to produce new urls. All you need to do is create a urlin and urlout array php file.
Anyway I have it sorted now and no longer require help. _________________ What is Pay Per Play ? |
|
Back to top |
|
|
pkSML -
Joined: 29 May 2006 Posts: 952 Location: Michigan, USA
|
|
Back to top |
|
|
|