php - htaccess redirect url with multiple query string args to SEO friendly url -


I've crawled StackExchange for 3 days and coming closer to finding a solution to my problem, but less time is coming. is.

I am using htaccess to rewrite the URL and redirect the SEO friendly URL. My htaccess is currently in this type.

  option + follow link -Multi view #RedriteEngine on reviveAngine ON / Rewrite Row at% {REQUEST_FILENAME}! -f rewrite code% {REQUEST_FILENAME}! -D Recrimest Rule ^ (. *) $ Index.php? $ 1 [L, QSA] ######################################### Remove Index . PHP URL ########################### URL # Rewrite% {THE_REQUEST} ^ [ Aged] {3,} \s (. *) / Index \ .php [nc] rewriterelale ^% 1 [r = 301, l] ################### ############################## # Bring #Reliance News In SEO Friendly URL ### ######## ########################### Rewrite %% THE_REQUEST} ^ [AGED] {3,} \ s / + (?: Index \ .php)? \? Page = ([^ \ s] +)? [NC] Reutersell ^ /% 1? [R = 301, L]   

Currently my link has 1 main argument '' page = some page '' on my user page, I have links that pass not only page logic But also have a User ID. This link is as follows:

 ? Page = users & amp; Id = 1   

In addition, a user has the option of editing their profile, so that the link is in the following way:

 ? Page = user & amp; ID = 1 & amp; 2 = Edit   

My HTACS handles the rearlight and redirects the URL properly, but when only {QUERY_STRING} has the same argument.

I have played with my existing rewrite, so that we can see many arguments in the query string and also try to rewrite several arguments to handle the query string. I have been successful in dealing with 2 arguments, but broke my basic rule (1 argument).

To write the URL for my revotic / rewrite rule, either 1 or more of {QUERY_STRING}?

I want to go to my URL:

 ? page = users? Page = users & amp; id = 1? Page = users & amp; id = 1 & amp; Do = edit   

To do this:

  / user / user / 1 / user / 1 / edit   < / Div> 

After tampering with my htaccess file, I managed to find a solution to my problem. It only proves that the answer you are seeking is often the most obvious and most overlooked of the following, I have been updated, and the working HTACX file.

  Option + Follow-up link - Multi View #RedriteEngineResign / RewriteCodeDrindbinding on %% {REQUEST_FILENAME}! -f rewrite code% {REQUEST_FILENAME}! -D rewrite ^ (. *) $ Index.php? $ 1 [L, QSA] ############################ Remove Remove Index PHP URL ##################################### THE_REQUEST} ^ From URL [AZ] {3,} \s (. *) / Index \ .php [NC] rewrite ^% 1 [R = 301, L] ################## ################################################################ # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # URL ######################################### ###### URL # Rewrite% {THE_REQUEST} ^ [AZ] {3,} \ s / + (?: Index \ .php)? \? Page = ([^ \ s] +)? [NC] Reutersell ^ /% 1? [R = 301] rewrite% {THE_REQUEST} ^ [AZ] {3,} \ s / + (?: Index \ .php)? \? Page = ([^ \ s] +) and id = ([^ \ s] +)? [NC] Remit Rules ^ /% 1 /% 2? [R = 301] rewrite% {THE_REQUEST} ^ [AZ] {3,} \ s / + (?: Index \ .php)? \? Page = ([^ \ s] +) and id = ([^ \ r]) & amp; Do = ([^ \ s] +)? [NC] rewritely ^ /% 1 /% 2 /% 3? [R = 301, L]   

Although this is working for my needs, I have another question ... Is it possible to simplify my HTCREERRTEK / REERTRRR in this file Is there a way?

Comments

Popular posts from this blog

php - PDO bindParam() fatal error -

logging - How can I log both the Request.InputStream and Response.OutputStream traffic in my ASP.NET MVC3 Application for specific Actions? -

java - Why my included JSP file won't get processed correctly? -