. htaccess problema

  • righteous_trespasser
  • Scuffle
  • Genius
  • Avatar de Usuario
  • Registrado: Mar 12, 2007
  • Mensajes: 6228
  • Loc: South-Africa
  • Status: Offline

Nota Junio 26th, 2009, 2:11 am

Tengo problemas con mi archivo. Htaccess y reescribir...esto no debería ser demasiado difícil, me siento muy bien sin ella.

Tengo el siguiente. Htaccess
Código: [ Select ]
RewriteEngine On

RewriteRule ^(.*)/(.*)/(.*).html$ /.php?data= [L]
RewriteRule ^(.*)/(.*).html$         /.php [L]
RewriteRule ^(.*).html$             .php [L]
  1. RewriteEngine On
  2. RewriteRule ^(.*)/(.*)/(.*).html$ /.php?data= [L]
  3. RewriteRule ^(.*)/(.*).html$         /.php [L]
  4. RewriteRule ^(.*).html$             .php [L]


Pero cuando voy a la página http://nmc.bong/member/view/3.html Me sale el siguiente error:
Código: [ Select ]
You don't have permission to access /redirect:/member/view.php.php.php on this server.


Sólo para información adicional, "miembro" es una carpeta y "ver" es una página php llamado "punto de vista. php "y luego una variable GET se le pasa, los" datos "...

¿Puede alguien decirme por favor qué Im que hace mal aquí?
Let's leave all our *plum* where it is and go live in the jungle ...
  • Anonymous
  • Bot
  • No Avatar
  • Registrado: 25 Feb 2008
  • Mensajes: ?
  • Loc: Ozzuland
  • Status: Online

Nota Junio 26th, 2009, 2:11 am

  • Brenden
  • Born
  • Born
  • No Avatar
  • Registrado: Jun 28, 2009
  • Mensajes: 3
  • Status: Offline

Nota Junio 28th, 2009, 2:10 am

En lugar de utilizar (.*) debería utilizar campos más específicos como ([a-zA-Z] *) y ([0-9] *), porque (.*) incluye barras inclinadas. También creo que reorientar su ubicación debería ser más concreto, como / $ 1 / $ 2.php? Datos = $ 3
  • spork
  • Brewmaster
  • Silver Member
  • Avatar de Usuario
  • Registrado: Sep 22, 2003
  • Mensajes: 6128
  • Loc: Seattle, WA
  • Status: Offline

Nota Junio 28th, 2009, 11:01 pm

Código: [ Select ]
RewriteEngine On
 
RewriteRule ^(.*)/(.*)/(.*)\.html$    /.php?data= [L]
RewriteRule ^(.*)/(.*)\.html$         /.php [L]
RewriteRule ^(.*)\.html$              .php [L]
  1. RewriteEngine On
  2.  
  3. RewriteRule ^(.*)/(.*)/(.*)\.html$    /.php?data= [L]
  4. RewriteRule ^(.*)/(.*)\.html$         /.php [L]
  5. RewriteRule ^(.*)\.html$              .php [L]


Consiguió escapar de esos puntos.
The Beer Monocle. Classy.
  • righteous_trespasser
  • Scuffle
  • Genius
  • Avatar de Usuario
  • Registrado: Mar 12, 2007
  • Mensajes: 6228
  • Loc: South-Africa
  • Status: Offline

Nota Junio 28th, 2009, 11:40 pm

Gracias un millón. Im que no estaba seguro de cómo me olvidé que...Hehe...gracias...tanto de sus entradas me puso en el buen camino juntos...Woot!
Let's leave all our *plum* where it is and go live in the jungle ...
  • righteous_trespasser
  • Scuffle
  • Genius
  • Avatar de Usuario
  • Registrado: Mar 12, 2007
  • Mensajes: 6228
  • Loc: South-Africa
  • Status: Offline

Nota Junio 29th, 2009, 12:25 am

Bueno tengo otro problema, con la siguiente línea:
Código: [ Select ]
RewriteRule ^([a-zA-Z0-9])/([a-zA-Z0-9])/([a-zA-Z0-9])\.html$ /.php?data= [L]

ou cuando imprimo mi variables GET usando etiquetas pre tengo la siguiente:
Código: [ Select ]
Array
(
)
  1. Array
  2. (
  3. )

¿Por qué sucede esto?
Let's leave all our *plum* where it is and go live in the jungle ...
  • joebert
  • Sledgehammer
  • Genius
  • No Avatar
  • Registrado: Feb 10, 2004
  • Mensajes: 13455
  • Loc: Florida
  • Status: Offline

Nota Junio 29th, 2009, 12:49 am

El cambio "[L]" a "[L, QSA]", que está a la "cadena de consulta Anexar".
Strong with this one, the sudo is.
  • righteous_trespasser
  • Scuffle
  • Genius
  • Avatar de Usuario
  • Registrado: Mar 12, 2007
  • Mensajes: 6228
  • Loc: South-Africa
  • Status: Offline

Nota Junio 29th, 2009, 12:55 am

Resultado Lamentablemente todavía exactamente de la misma...lo que en este momento estoy mirando http://nmc.bong/member/view/3.html y tengo el RewriteRule siguientes:
Código: [ Select ]
RewriteRule ^([a-zA-Z0-9])/([a-zA-Z0-9])/([a-zA-Z0-9])\.html$ /.php?data= [L,QSA]

y todavía estoy recibiendo el siguiente cuando se imprime mi variable GET así:
Código: [ Select ]
echo "<pre>" . print_r($_GET,1) . "</pre>";

la salida:
Código: [ Select ]
Array
(
)
  1. Array
  2. (
  3. )
Let's leave all our *plum* where it is and go live in the jungle ...
  • righteous_trespasser
  • Scuffle
  • Genius
  • Avatar de Usuario
  • Registrado: Mar 12, 2007
  • Mensajes: 6228
  • Loc: South-Africa
  • Status: Offline

Nota Junio 29th, 2009, 12:56 am

oh y por supuesto el. bong extensión no existirá para ti, esta es una demostración de sitio...
Let's leave all our *plum* where it is and go live in the jungle ...
  • righteous_trespasser
  • Scuffle
  • Genius
  • Avatar de Usuario
  • Registrado: Mar 12, 2007
  • Mensajes: 6228
  • Loc: South-Africa
  • Status: Offline

Nota Junio 29th, 2009, 1:14 am

Bien, theres más mal, oh mi, quiero explicar brevemente lo que he hecho y lo que Deseo de lograr, y tal vez tendría más sentido entonces...

Tengo la siguiente estructura de carpetas:
  • index.php
  • miembro (carpeta)
    • add.php
    • view.php
    • borrar. php
  • profile_holder (carpeta)
    • add.php
    • view.php
    • delete.php

Y Deseo tener la siguiente URL...
nmc.bong / miembros / add.html...va a nmc.bong / miembros / add.php
nmc.bong/member/view/1. html...va a nmc.bong / miembros / view.php? datos = 1
nmc.bong/member/delete/1.html...va a nmc.bong / miembros / delete.php? datos = 1

nmc.bong / profile_holder / add.html...va a nmc.bong / profile_holder / add.php
nmc.bong/profile_holder/view/1.html...va a nmc.bong / profile_holder / view.php? datos = 1
nmc.bong/profile_holder/delete/1.html...va a nmc.bong / profile_holder / delete.php? datos = 1

nmc.bong / home. html...va a nmc.bong / index.php? datos = casa
nmc.bong / about_us.html...va a nmc.bong / index.php? datos = about_us

¿Cómo puedo conseguirlo?
Let's leave all our *plum* where it is and go live in the jungle ...
  • righteous_trespasser
  • Scuffle
  • Genius
  • Avatar de Usuario
  • Registrado: Mar 12, 2007
  • Mensajes: 6228
  • Loc: South-Africa
  • Status: Offline

Nota Julio 8th, 2009, 1:15 am

Bueno voy a intentarlo de nuevo, no estoy ganando con esto. Mi estructura de la carpeta es todavía como lo es en el post anterior, y de mi. htaccess parece que sigue:
Código: [ Select ]
RewriteEngine On

RewriteRule ^([a-zA-Z0-9])/([a-zA-Z0-9])/([a-zA-Z0-9])\.html$     /\.php?data= [L,QSA]
RewriteRule ^([a-zA-Z0-9])/([a-zA-Z0-9])\.html$                         /\.php [L]
RewriteRule ^([a-zA-Z0-9])\.html$                                 \.php [L]
  1. RewriteEngine On
  2. RewriteRule ^([a-zA-Z0-9])/([a-zA-Z0-9])/([a-zA-Z0-9])\.html$     /\.php?data= [L,QSA]
  3. RewriteRule ^([a-zA-Z0-9])/([a-zA-Z0-9])\.html$                         /\.php [L]
  4. RewriteRule ^([a-zA-Z0-9])\.html$                                 \.php [L]


He subido el sitio a un servidor en vivo aquí ...
Las direcciones URL Estoy teniendo problemas con son los siguientes:

http://www.nmcfashion.co.za/member/add.html...que debe ir a http://www.nmcfashion.co.za/member/add.php

http://www.nmcfashion.co.za/member/view/3.html...que debe ir a http://www.nmcfashion.co.za/member/view.php?data=3

http://www.nmcfashion.co.za/login.html...que debe ir a http://www.nmcfashion.co.za//login.php

Si los que trabajan el resto de trabajo, pero me parece que no puede conseguir este trabajo.
Let's leave all our *plum* where it is and go live in the jungle ...

Publicar Información

  • Total de mensajes en este tema: 10 mensajes
  • Usuarios navegando por este Foro: Bigwebmaster y 190 invitados
  • No puede abrir nuevos temas en este Foro
  • No puede responder a temas en este Foro
  • No puede editar sus mensajes en este Foro
  • No puede borrar sus mensajes en este Foro
  • No puede enviar adjuntos en este Foro
 
 

© 2011 Unmelted, LLC. Ozzu® es una marca registrada de Unmelted, LLC