|
|
|||||||||
|
|||||||||
|
|||||||||
| |
|||
| ||||||||||||||||||||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
Article Dicussion: Search Engine Friendly URLs with mod_rewrite
If you have any questions or comments on this article then please post them here.
This forum post relates to this article |
|
#2
|
|||
|
|||
|
Is there anyway to do this same sort of thing running IIS?
|
|
#3
|
|||
|
|||
|
I can't get mod_rewrite to work.
Can you help?
|
|
#4
|
||||
|
||||
|
For mod_rewrite on IIS, google "mod_rewrite IIS" - heaps of companies are offering it
|
|
#5
|
|||
|
|||
|
Thanks!
Thanks!
|
|
#6
|
|||
|
|||
|
Prerequisites
./configure --enable-module=rewrite --enable-shared=rewrite <Directory /www/htdocs/yoursite> Options ExecCGI FollowSymLinks Includes MultiViews </Directory> Where do the files containing ./configure and the httpd.config go? |
|
#7
|
|||
|
|||
|
nevermind, I just reread stumpy's post.
|
|
#8
|
|||
|
|||
|
Hello maybe someone help me. In .htaccess file i have:
Code:
RewriteEngine On RewriteRule ^test/(.*)/(.*).php /test.php?action=$1&ok=$2 and in test.php file i have: PHP Code:
when i'm going to: URL it show: hello again but when i'm going to: URL then it's show 404 error why?? Last edited by sZen : August 26th, 2003 at 01:55 PM. |
|
#9
|
|||
|
|||
|
I can see this:
You are telling the Rewrite rule to do this: RewriteRule ^test/(.*)/(.*).php /test.php?action=$1&ok=$2 Which means that after test must have something/something.php This is OK when you do the first link: http://www.mysite.com/test/oc/yes.php But it fails when trying to do the second one because you are not matching the rule, and it tries to find the literal URL you typed, which don't exist... http://www.mysite.com/test/oc.php Well that's what I think... ![]()
__________________
The deal is not to know everything, but to know the email of the one who does. |
|
#10
|
|||
|
|||
|
Now I have a question...
I have been testing this rewrite thing, and I think that it is clear enough how tou use it, but when it comes to the PHP script which is called after the rewrite, I don't know how to deal with the $_GET variables I was using to feed the variables and functions... Let's say that I rewrite this: www.site.com/products/123 to this: www.site.com/index.php?mode=catalog&prodID=123 Then I try to use (as I did it before) $_GET["mode"] to launch the product catalog, and $_GET["prodID"] to retrieve the info for that product. It just does NOTHING... it seems like $_GET is not available. Am I doing something wrong or should I change the way I pass variables between scripts? Thank You! ![]() |
|
#11
|
|||
|
|||
|
I have another question...
Does the author read the forum posts about his article? or is this because of the incorrect forum?? (this one should be in Article Discussion, not "Other Stuff") Thank you anyway. ![]() |
|
#12
|
|||
|
|||
|
Hey manoloweb. I have just moved the forum over to Articles Discussions. The Article Discussions is a new forum and we're still in the process of moving over all the article discussion threads to the new forum.
|
|
#13
|
|||
|
|||
|
We're currently testing ISAPI rewrite and it's not working as I had anticipated. It also doesn't transpose all the links, rather it just seems to allow for itempage/page/5 to work the same as itempage.asp?pageid=5. By substituting / instead ? and, it's in effect creating subdirectories in the url, which throws off all the image links and hyperlinks. (I have used include files) Since my images are located in a images folder, itempage/page/5 needs a ../../images/ whereas itempage.asp?pageid=5 needs images/
I don't want to submit 500+ pages to search engines, so I'm thinking that I'm doing something wrong here. Do I need to do redirects for the pages as well? I thought search engines don't like that? I would be interested to hear from anyone else who has experience with this or the other IIS rewrite program. |
![]() |
| Viewing: Dev Articles Community Forums > Community > Development Tutorials > Article Dicussion: Search Engine Friendly URLs with mod_rewrite |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|