Ok, thanks. Is there anyway to type in a .htaccess file without messing up the code? For instance, in php you will do "// Text" In the .htaccess file I tried "<text>" and it didn't work? But, when I try to seperate my code with the <text> I get an internal Server Error?
I'm really new to these things and need help how to do this the best way? I need to get both of these url's variants: http://www.mydomain.com/index.php?k=keyword&s=seller http://www.mydomain.com/?k=keyword&s=seller to be changed to this: http://www.mydomain.com/keyword/seller.html if ANY of the variables $k or $s is EMPTY how will it look/work then ? Will the original variables $k and $s still work and have values in my php script?
HI, I am facing problem while submiting the values from the re-writen URL. for example : Originale URL : www.website.com/links.php?id=21 re writen url : www.website.com/21.html when I am submiting the values, the following is the new URL new url : www.website.com/21.html?comments=test how can i get the submited values. I am not sure how to handle this situation. Please help me.
this is my THANKYOU Mr. super nenna Im still confused on the whole topic but i have some great friends that helped me out (had to change the php code what-cha-mah-call-its aswell ) well it worked and im happy for the moment :0 so thanks once again EEGGENZ 2007
I got my url's re-written okay. But now I have exactly same problem as you! If you or anyone else have/find a solution, pls post it here. This is how it looks for me: www.website.com/product/seller.html And it become like this when I post: www.website.com/product/seller.html?k=product&s=seller How to avoid "?k=product&s=seller" is added at end of url? Guess something need to be done in the php code ... But what ? To start with, shall we use POST or GET ?
What does the link code look like in the script? domain.com/$k/$s.html is how it should look. Having the full domain in the link code might fix it. Links have to be as if the URLs are real. The browsers have no idea you're using mod_rewrite.
Nintendo, this is my form code: <form name="SearchForm" method="get"> <input name="k" type="text" size="21" value="<? print $keywords; ?>"><br> <input name="s" type="text" size="21" value="<? print $seller; ?>"><br> <input type="submit" value="Search"><br> </form> Code (markup): Normal link is easy to make correct: http://www.mysite.com/<? print $k; ?>/<? print $s; ?>" Code (markup): The big problem is the FORM code above ... Any idea how to get that working also ?
Search engines don't use forms, so they wouldn't ever seen the form results page. I only know how to make forms spit out static URLs in perl.
suppose i have site which have many sub domains... and i just want to redirect to non www to with "WWW.domainname.con" but thats way my sub domain name also getting like "WWW.subdomainname.domainname.con" which i dont want... shall i put different to each and every folder OR WE have some another rewrite rules for that ?
yeah, i guessed that, but its such a pain to do all by manually if each 12 sites have a 13 subdomain name ! Though, thanks for clarify.
Hello, Does rewrite work for links in rss feeds that have been parsed into html? For example, http://caboosh.org/youtube.php?query=cooking I'm trying to rewrite the urls in the "keywords", so that the keyword will run through my search script. So far I cannot get it to work. Could you help me?
Could someone please help me to redirect the following? All urls.. http://www.domain.com/product.php?refid=298 http://www.domain.com/product.php?refid=298&lang=language http://www.domain.com/prodduct.php?refid=298 http://www.domain.com/prodduct.php?refid=298&lang=language to either http://www.domain.com/product/refid-language.html or http://www.domain.com/product/refid.html (if there is no lang=language) and also to make sure that any current links to the old URL's are 301'd to the new ones?
Options +FollowSymLinks +Indexes RewriteEngine on RewriteBase / RewriteRule ^prodducts/([^.]+)\-([^.]+)\.html$ prodduct.php?refid=$1&lang=$2 [L] RewriteRule ^product/([^.]+)\-([^.]+)\.html$ product.php?refid=$1&lang=$2 [L] RewriteRule ^prodducts/([^.]+)\.html$ prodduct.php?refid=$1 [L] RewriteRule ^product/([^.]+)\.html$ product.php?refid=$1 [L] Each script would have to have it's own fake for example directory. For example prodducts and product.
Hello, If I'm using Get commands to take the url or the search query from the url, would using such a rewrite stop this working? Or do I have to alter the Get command? Thanks.