What am I missing ?

 
Post new topic   Reply to topic    Aprelium Forum Index -> URL Rewriting
View previous topic :: View next topic  
Author Message
Marty_
-


Joined: 21 Feb 2006
Posts: 55

PostPosted: Wed Oct 31, 2007 1:27 pm    Post subject: What am I missing ? Reply with quote

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 View user's profile Send private message
aprelium-beta
-


Joined: 24 Jun 2004
Posts: 383

PostPosted: Wed Oct 31, 2007 5:53 pm    Post subject: Re: What am I missing ? Reply with quote

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 View user's profile Send private message Send e-mail
Marty_
-


Joined: 21 Feb 2006
Posts: 55

PostPosted: Wed Nov 07, 2007 12:17 am    Post subject: Reply with quote

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 View user's profile Send private message
pkSML
-


Joined: 29 May 2006
Posts: 952
Location: Michigan, USA

PostPosted: Thu Nov 08, 2007 11:01 pm    Post subject: Reply with quote

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 View user's profile Send private message Visit poster's website
Marty_
-


Joined: 21 Feb 2006
Posts: 55

PostPosted: Fri Nov 09, 2007 10:09 am    Post subject: Reply with quote

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 View user's profile Send private message
pkSML
-


Joined: 29 May 2006
Posts: 952
Location: Michigan, USA

PostPosted: Fri Nov 09, 2007 1:33 pm    Post subject: Reply with quote

Glad you got it figured out.
Like I said, I had a little trouble following what you were trying to do.

I'll put a plugin for my new site http://abyss-websites.com
Register your Abyss site: http://abyss-websites.com/add Thanks!
_________________
Stephen
Need a LitlURL?


http://CodeBin.yi.org
Back to top View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    Aprelium Forum Index -> URL Rewriting All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB phpBB Group