samedi 29 novembre 2014

unclean url displayed instead of rewrite - htaccess


Vote count:

0




htaccess



Options +FollowSymLinks
RewriteEngine on

# RewriteCond %{HTTP_HOST} !^domain.com$ [NC]
# RewriteRule ^(.*)$ http://www.domain.com/$1 [L,R=301]

RewriteRule ^rewrite-php-page/$ /http://domain.com/rewrite-php-page.php [L]
RewriteRule ^rewrite-php-page-([^-]*)-get-input-query-([^-]*)/$ /http://domain.com/rewrite-php-page.php?firstquery=$1&get-input-query=$2&submit=Get+my+age [L]

Rewriterule ^sitemap.xml$ sitemap-xml.php [L]

Options -Indexes

ErrorDocument 403 /error_pages/403.php
ErrorDocument 404 /error_pages/404.php


I'm trying to rewrite my site urls seo friendly. When I access my site url like this


http://www.domain.com/rewrite-php-page/


This rewritten url also working fine when I directly access this url http://www.domain.com/rewrite-php-page-123-get-input-query-456/ . But, when I submit a form with user inputs it doesn't redirect to this url


http://www.domain.com/rewrite-php-page-123-get-input-query-456/


instead of this above url it normaly print the parameters in url like this


http://www.domain.com/rewrite-php-page.php?firstquery=111&get-input-query=222&submit=Send+values


What should I do if I want to get the proper clean url when I'm submitting a form ?



asked 17 secs ago

Beginner

1,608






unclean url displayed instead of rewrite - htaccess

Aucun commentaire:

Enregistrer un commentaire