Cambiare keyword in htaccess

  • Creatore Discussione Creatore Discussione juanjump
  • Data di inizio Data di inizio

juanjump

Nuovo Utente
12 Mag 2010
4
0
1
Ciao a tutti,
mi sto scornando con la riscrittura degli url (non proprio il mio forte).

Ho un file htaccess che genera questo tipo di url:

http:// miodominio.ext /id-nome-categoria/1/listings.html

Io vorrei sostituire quel "listings" con una keyword diversa.

Il file htaccess è questo:

########

#RewriteBase /

RewriteRule ^index.html index.php [nc]
RewriteRule ^recent_ads.html recent_ads.php [nc]
RewriteRule ^register.html register.php [nc]
RewriteRule ^pre-register.html pre-register.php [nc]
RewriteRule ^login.html login.php [nc]
RewriteRule ^logout.html logout.php [nc]
RewriteRule ^favourites.html favourites.php [nc]
RewriteRule ^contact.html contact.php [nc]
RewriteRule ^advanced_search.html advanced_search.php [nc]
RewriteRule ^listings.html listings.php [nc]
RewriteRule ^pre-submit.html pre-submit.php [nc]
RewriteRule ^([0-9]+)-([^\/]+)?/content.html$ content.php?id=$1 [nc,qsa]
RewriteRule ^([0-9]+)-([^\/]+)/index.html$ index.php?category=$1 [nc,qsa]
RewriteRule ^([0-9]+)-([^\/]+)/details.html$ details.php?id=$1 [nc,qsa]
RewriteRule ^([^\/]+)/([^\/]+)/([^\/]+)/recent_ads.html$ recent_ads.php?page=$1&order=$2&order_way=$3 [nc,qsa]
RewriteRule ^([0-9]+)-([^\/]+)/user_listings.html$ user_listings.php?id=$1 [nc,qsa]
RewriteRule ^([0-9]+)-([^\/]+)/([^\/]+)/([^\/]+)/([^\/]+)/user_listings.html$ user_listings.php?id=$1&page=$3&order=$4&order_way=$5 [nc,qsa]
RewriteRule ^([^\/]+)/([^\/]+)/([^\/]+)/favourites.html$ favourites.php?page=$1&order=$2&order_way=$3 [nc,qsa]
RewriteRule ^([0-9]+)-([^\/]+)/store.html$ store.php?id=$1 [nc,qsa]
RewriteRule ^([0-9]+)-([^\/]+)/([^\/]+)/([^\/]+)/([^\/]+)/store.html$ store.php?id=$1&page=$3&order=$4&order_way=$5 [nc,qsa]

RewriteCond %{REQUEST_URI} ^(.*)(/listings.html)(.*)$ [NC]
RewriteCond %{SCRIPT_FILENAME} !-f
RewriteCond %{SCRIPT_FILENAME} !-d
RewriteRule (.*) ./listings.php?$1
#########

Idee?
Thanks
 

Discussioni simili