Jump to content

Url rewrite with relative link handle


londonline

Recommended Posts

I have write down this to handle the relative links

for the url rewrite requests but I don't know if it is correct..  :o

Do I need to move all the "relative link  handler" at the bottom of the script?

This is my first url rewrite, please, help!!!!

Thanks

 

[pre]

RewriteEngine On

Options +FollowSymlinks

RewriteBase /

RewriteRule ^telefonia_aziende/gestori/regione([^/_]+)_connessione([^/_]+)_pagina([^/_]+).html?$ elenco.gestori.telefonici.php?reg_id=$1&conn_id=$2&pag=$3&giur_id=2 [L]

RewriteRule ^telefonia_aziende/gestori/(.*)$  http://www.mysite.net/$1  [R]

 

RewriteRule ^telefonia_privati/gestori/regione([^/_]+)_connessione([^/_]+)_pagina([^/_]+).html?$ elenco.gestori.telefonici.php?reg_id=$1&conn_id=$2&pag=$3&giur_id=1 [L]

RewriteRule ^telefonia_privati/gestori/(.*)$  http://www.mysite.net/$1  [R]

[/pre]

Link to comment
Share on other sites

In another post I found this solution:

[pre]You need to specify the base URL for all relative links in a page using the <base> html tag.

In my case I put this tag into my header template file which is the same for all my pages.

<head>

...

<base href="http://site.com/base/" />

....

</head>[/pre]

 

Can anyone tell me what's the best solution? This solution or the rewrite rule

[pre]RewriteRule ^telefonia_aziende/gestori/(.*)$  http://www.mysite.net/$1  [R][/pre]

 

Which is better for performance and cross-browser/user friendly?

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.