jeudi 4 janvier 2018

Rewrite URLs not in root directory

This is what I have so far, its not working as I'd hoped:

RewriteEngine On
RewriteRule ^(.*)$ /index.php?id=$1/ [L]

RewriteCond %{HTTP_HOST} ^(www\.)?example\.com$ [NC]
RewriteCond %{HTTPS} off [OR]
RewriteCond %{HTTP_HOST} ^www\. [NC]
RewriteRule ^ https://example.com%{REQUEST_URI} [R=301,L,NE]

Basically I want to remove index.php everywhere, and in a directory I want to edit a query string also, like so:

http://ift.tt/2CRczqs

Should be:

http://ift.tt/2CrkQk4

Is this possible?

Aucun commentaire:

Enregistrer un commentaire