Welcome to MobyThreads.com!
FAQFAQ      ProfileProfile    Private MessagesPrivate Messages   Log inLog in
All support for the MobyThreads Threaded phpBB MOD can now be found on welsolutions at this forum

Rewrite rules

 
   Web Hosting and Web Master Forums (Home) -> Apache RSS
Next:  Alias directive  
Author Message
chatiman

External


Since: Feb 13, 2004
Posts: 2



(Msg. 1) Posted: Fri Feb 13, 2004 9:09 pm
Post subject: Rewrite rules
Archived from groups: alt>apache>configuration (more info?)

How do you rewrite links of the form:
index.cgi?param1=value1&param2=value2
to make them google friendly ?

 >> Stay informed about: Rewrite rules 
Back to top
Login to vote
spam3

External


Since: Jul 01, 2003
Posts: 411



(Msg. 2) Posted: Fri Feb 13, 2004 9:09 pm
Post subject: Re: Rewrite rules [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

chatiman wrote:

 > How do you rewrite links of the form:
 > index.cgi?param1=value1&param2=value2
 > to make them google friendly ?

If index.cgi is <a style='text-decoration: underline;' href="http://www.exmaple.com/index.cgi" target="_blank">http://www.exmaple.com/index.cgi</a> ...

In the HTML, generate links as (for example)
<a style='text-decoration: underline;' href="http://www.exmaple.com/value1/value2" target="_blank">http://www.exmaple.com/value1/value2</a> or
<a style='text-decoration: underline;' href="http://www.exmaple.com/value1/value2/" target="_blank">http://www.exmaple.com/value1/value2/</a>

Then use:
RewriteRule ^([^/]+)(/([^/]+))?(/([^/]+))?(/([^/]+))?/?$
index.cgi?param1=$1&param2=$3&param3=$5&param4=$7 [L,NS,QSA]

You'll just need to sure that the order of the paramaters are correct
when generating your links.

--
Justin Koivisto - spam.RemoveThis@koivi.com
PHP POSTERS: Please use comp.lang.php for PHP related questions,
alt.php* groups are not recommended.
Official Google SERPs SEO Competition: <a style='text-decoration: underline;' href="http://www.koivi.com/serps.php" target="_blank">http://www.koivi.com/serps.php</a><!-- ~MESSAGE_AFTER~ -->

 >> Stay informed about: Rewrite rules 
Back to top
Login to vote
chatiman

External


Since: Feb 13, 2004
Posts: 2



(Msg. 3) Posted: Fri Feb 13, 2004 10:02 pm
Post subject: Re: Rewrite rules [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Can i just use
<a style='text-decoration: underline;' href="http://www.example.com/param1=value1/param2=value2" target="_blank">http://www.example.com/param1=value1/param2=value2</a> for links ?

"Justin Koivisto" <spam RemoveThis @koivi.com> a écrit dans le message de news:
tH7Xb.310$sS3.8922@news7.onvoy.net...
 > chatiman wrote:
 >
  > > How do you rewrite links of the form:
  > > index.cgi?param1=value1&param2=value2
  > > to make them google friendly ?
 >
 > If index.cgi is <a style='text-decoration: underline;' href="http://www.exmaple.com/index.cgi" target="_blank">http://www.exmaple.com/index.cgi</a> ...
 >
 > In the HTML, generate links as (for example)
 > <a style='text-decoration: underline;' href="http://www.exmaple.com/value1/value2" target="_blank">http://www.exmaple.com/value1/value2</a> or
<font color=purple> > <a style='text-decoration: underline;' href="http://www.exmaple.com/value1/value2/</font" target="_blank">http://www.exmaple.com/value1/value2/</font</a>>
 >
 > Then use:
 > RewriteRule ^([^/]+)(/([^/]+))?(/([^/]+))?(/([^/]+))?/?$
 > index.cgi?param1=$1&param2=$3&param3=$5&param4=$7 [L,NS,QSA]
 >
 > You'll just need to sure that the order of the paramaters are correct
 > when generating your links.
 >
 > --
 > Justin Koivisto - spam RemoveThis @koivi.com
 > PHP POSTERS: Please use comp.lang.php for PHP related questions,
 > alt.php* groups are not recommended.
<font color=purple> > Official Google SERPs SEO Competition: <a style='text-decoration: underline;' href="http://www.koivi.com/serps.php</font" target="_blank">http://www.koivi.com/serps.php</font</a>><!-- ~MESSAGE_AFTER~ -->
 >> Stay informed about: Rewrite rules 
Back to top
Login to vote
spam3

External


Since: Jul 01, 2003
Posts: 411



(Msg. 4) Posted: Fri Feb 13, 2004 10:02 pm
Post subject: Re: Rewrite rules [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

chatiman wrote:

 > "Justin Koivisto" <spam DeleteThis @koivi.com> a écrit dans le message de news:
 > tH7Xb.310$sS3.8922@news7.onvoy.net...
 >
  >>chatiman wrote:
  >>
   >>>How do you rewrite links of the form:
   >>>index.cgi?param1=value1&param2=value2
   >>>to make them google friendly ?
  >>
  >>If index.cgi is <a style='text-decoration: underline;' href="http://www.exmaple.com/index.cgi" target="_blank">http://www.exmaple.com/index.cgi</a> ...
  >>
  >>In the HTML, generate links as (for example)
  >>http://www.exmaple.com/value1/value2 or
  >>http://www.exmaple.com/value1/value2/
  >>
  >>Then use:
  >>RewriteRule ^([^/]+)(/([^/]+))?(/([^/]+))?(/([^/]+))?/?$
  >>index.cgi?param1=$1&param2=$3&param3=$5&param4=$7 [L,NS,QSA]
  >>
  >>You'll just need to sure that the order of the paramaters are correct
  >>when generating your links.
  >>
 > Can i just use
 > <a style='text-decoration: underline;' href="http://www.example.com/param1=value1/param2=value2" target="_blank">http://www.example.com/param1=value1/param2=value2</a> for links ?

Sure, it's your site, do it however you want. You'll just need to adjust
the Rewrite Rule:

index.cgi?$1&$3&$5&$7 [L,NS,QSA]

should work, but not tested... Wink
--
Justin Koivisto - spam DeleteThis @koivi.com
PHP POSTERS: Please use comp.lang.php for PHP related questions,
alt.php* groups are not recommended.
Official Google SERPs SEO Competition: <a style='text-decoration: underline;' href="http://www.koivi.com/serps.php" target="_blank">http://www.koivi.com/serps.php</a><!-- ~MESSAGE_AFTER~ -->
 >> Stay informed about: Rewrite rules 
Back to top
Login to vote
Display posts from previous:   
Related Topics:
ReWrite Rules - Hi, Currently my homepage is http://www.indigoclothing.com/index.shtml However I would now want my homeapge to be: http://www.indigoclothing.com/cgi-bin/page.cgi?d=1&page=homepage The dynamic page is different from the static one as the featured...

Rewrite rules & Subdomains - Hi, We are looking to use rewrites rules for subdomains. Ex: http://sub.domain.com -> http://www.domain.com/sub We use this rule: RewriteEngine on RewriteCond %{HTTP_HOST} ^[^.]+\.DOMAIN\.TLD$ RewriteRule ^(.+) ...

Apache Rewrite Rules - Hello, I have compiled mod_rewrite and mod_proxy into my apache 1.3.x server and are trying to rewrite any requests that come into the server for files in my cgi-bin/ directory to another apache server running on port 8080. I have tried these two rule...

Combining two rewrite rules - stuck :| - Hello I'm trying to combine: RewriteEngine on RewriteCond %{HTTP_REFERER} !^$ RewriteCond %{HTTP_REFERER} !^http://poff\.sixbit\.org.*$ [NC] RewriteCond %{REQUEST_FILENAME} .*\.(jpg|gif|png|jpeg)$ RewriteRule \.(jpg|gif|png|jpeg)$..

rewrite rules for one file depending on subdomain - Hi, I have a simple problem and after trying to figure out the docs and posts I haven't found an example to solve it, yet I'm sure rewrite is the answer. I have several subdomains pointing to the same directory, but different logs as in: <VirtualHo...
   Web Hosting and Web Master Forums (Home) -> Apache All times are: Pacific Time (US & Canada) (change)
Page 1 of 1

 
You can post new topics in this forum
You can 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



[ Contact us | Terms of Service/Privacy Policy ]