This is my case
im is not good in any way with regexp, Avoid the kind of illness I have gone through every result on Google, now goodness "Im on searching for suicide and to die quickly" Please do I really need your help, remove the extension and query me String again
Such a Please see when I mean For example, I should We are capturing here the value of the query string as If you have to send this magic back to the original string, you have to capture it in reverse ways. Note: You will not use the [R] flag here because it asks to redirect the browser. : Remember that you already have the Now, you can type in www.example.com/story.php?pcord=$1 - & gt; Like
www.example.com/story/%1
% 1 I do not like PCOs to reorganize on the URL < / P>
www.example.com/story.php?pcord=4849AAS84 should look something like
www.example.com Here is the code I tried to use but it does not work at all, only removes the extension
Option + Follow-up Link - Redistrite to Multi View Turn Zine on to revertabase ## wrap .php extension snippet # rewrite / dir / foo at /dir/foo.php Cond% {THE_REQUEST} ^ [AZ] {3,} \ s ([^ .] +) \. Php [NC] rewrite rule ^% 1 [R, L] # Internally forward / DAY / EFU / DIREES / F.Php RewriteCond% {REQUEST_FILENAME}! -d RevertCand% {DOCUMENT_ROOT} / $ 1.php -f Rewrite Rules ^ (. *?) /? $$ 1.php [L]
.htaccess < / Code>
% 1 , then we will recieve a relative URL Which starts with
story.php , which is done in a folder called
story by our capturing string, then we will see the < Code>? are added to prevent the default nature of the
[QSA] (the query string append) on a string, a new query string is not created to make it a permanent rewrite Add
[R] flag to:
#External Redirect RewriteCond% {QUERY_STRING} pcord = ([A-Za-z0-9] +) rewrite ^ story .php story /% 1? [R = 301, L]
#Internal Forward RewriteRule ^ Story / ([A-Za-z0- 9] +) story.php? Pcord = $ 1 [L]
[R = 301] directive, this is probably cached in your browser.
pcord in PHP to
$ _GET ['pcord'] . The last code for
.htaccess will be:
RewriteEngine On RewriteBase / #Eternal RestirectRewriteCond% {QUERY_STRING} pcord = ([A-Za -z0- 9] +) Rivetrium ^ story.php Story /% 1? [R = 301, L] #Interior Forward Rearrittel ^ Story / ([AZA-J 0-9] +) story.php? Pcord = $ 1 [L] RERETE condom% {REQUEST_FILENAME}! ^ Story revoked% {REQUEST_FILENAME} \ .php $ RewriteCond% {REQUEST_FILENAME}! -f rewrite% {REQUEST_FILENAME}! -d # Create external redirects for all existing .php files, which are not the story. PHP RewriteRule ^ ([^ /] +) \ php $$ 1 / [R = 301, L] # Prepare the internal forward, which they reverted to% {REQUEST_FILENAME} ^ {* A-Za-z0- 9] +) /? $ RewriteCond mounts to hide in% {REQUEST_FILENAME}! -d RecoveryCand% 1 \ .php -f Rewrite Rule ^ ([^ /] +) /? $ $ 1.php [L]
No comments:
Post a Comment