convert to SEO friendly URLs for Language code and multiple other URLs

Hi All,

I need a help for the below URLs to convert to SEO friendly in httpd.conf.

1.  /more/in-your-language/français?languageCode=fr --> /more/in-your-language/fr ( like fr we have multiple languages)
2. /plan-and-book-your-trip/destination-guides/country-and-city-guide/individual-destinations-guides?country=Bermuda&city=null&state=null --> /plan-and-book-your-trip/destination-guides/country-and-city-guide/individual-destinations-guides/Bermuda (here as well we have multiple countries, states & cities)
3. /arrivals/Flight-details_cancelled?flightNo=BA016&flightDate=19-Nov-14&type=ARRIVAL&flight-status=Landed&terminal=5&statuscode=LD&addinfo=--  ---> /arrivals/Flight-details_cancelled/BA016 (here also there there are multiple parameters)
4. /departures/Flight-details_cancelled?flightNo=BA016&flightDate=19-Nov-14&type=ARRIVAL&flight-status=Landed&terminal=5&statuscode=LD&addinfo=--  ---> /departures/Flight-details_cancelled/BA016 (here also there there are multiple parameters)

i have tried but am getting the URLs as below
1. more/in-your-language/es - getting page not found
2. plan-and-book-your-trip/destination-guides/country-and-city-guide/individual-destinations-guides/Bermuda/null/null - null has to be hide and if i select any city or state it should append next to country.
3. arrivals/Flight-details_scheduled/BA016/19-Nov-14/ARRIVAL/Landed/5/LD/-- - here i should get only flight no, i have tride to hide the rest but am getting an exception.
4. for departures as well am getting the url starting with arrivals, because the parameter fields are same.

Please help me on these...

Thanks in advance.

Regards
Venkat
Srivenkata nandipatiAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Bernard S.CTOCommented:
You are in fact dealing with 2 different related problems:
1 - generating the smart urls to be displayed on your web site
2 - redirecting all the incomig urls to the correct place in your site / program

Mod rewrites are usually associated with step 2 (making friendly urls into possibly unfriendly urls that the program can handle), while you seem in fact dealing with step 1.

Can you give us more details?
0
Srivenkata nandipatiAuthor Commented:
Hi,

the below rules used.

1. RewriteCond %{QUERY_STRING} languageCode=(.*)
RewriteRule (.*) $1/%1? [R=301]

here am not able to hide the français/English/etc..

2.  RewriteCond %{QUERY_STRING} ^country=(.*)&city=(.*)&state=(.*) [NC]
RewriteRule ^(.*) /plan-and-book-your-trip/destination-guides/country-and-city-guides/individual-destinations-guides/%1/%2/%3? [R=301,L]
RewriteCond %{REQUEST_URI} /plan-and-book-your-trip/destination-guides/country-and-city-guides/individual-destinations-guides/(.*)
RewriteRule ^/plan-and-book-your-trip/destination-guides/country-and-city-guides/individual-destinations-guides/([a-zA-z0-9%()]+)/([a-zA-z0-9%()]+)/([a-zA-z0-9%()]+) "/localhost/plan-and-book-your-trip/destination-guides/country-and-city-guides/individual-destinations-guides?country=$1&city=$2&state=$3" [NC,PT]
RewriteRule ^/plan-and-book-your-trip/?(.*) "/localhost/plan-and-book-your-trip/$1"  [PT,QSA]

here, if select only country the url should be having only country name in the end, if state name only state name and same way for city. But with the above rules am getting country/null/null eg: .../Nigeria/null/null.

3. RewriteCond %{REQUEST_URI} ^/arrivals/(.*)
RewriteCond %{QUERY_STRING} ^flightNo=(.*)&flightDate=(.*)&type=(.*)&flight-status=(.*)&terminal=(.*)&statuscode=(.*)&addinfo=(.*) [NC]
RewriteRule ^(.*) /arrivals/Flight-details_scheduled/%1? [R=301,L]

RewriteCond %{REQUEST_URI} /arrivals/Flight-details_scheduled/(.*)
RewriteRule ^/arrivals/Flight-details_scheduled/([a-zA-z0-9%()]+) "/localhost/arrivals/Flight-details_scheduled?flightNo=$1&flightDate=$2&type=$3&flight-status=$4&terminal=$5&statuscode=$6&addinfo=$7" [NC,PT]
RewriteRule ^/arrivals/?(.*) "/localhost/arrivals/$1" [PT,QSA]

Here the url should contain only flight no, but am getting the url with all the values. Also the url may contain Flight-details_scheduled/Flight-details_cancelled/Flight-details_Diverted.

4. Here i have the same rules as Arrivals with replacing departures.

Please let me know any other details required.

Thanks in Advance.
0
Bernard S.CTOCommented:
Thx.
My question and request for details is to check if you are in my scenario 1/ or scenario 2/
0
Srivenkata nandipatiAuthor Commented:
scenario 1
0
Bernard S.CTOCommented:
If you are in the scenario 1 then the smart urls must be generated by the program which handles your site, and the mod_rewrite will in fact handle the smart urls to translate them for your program.

Do you know which program is handling your site (eg, Wordpress, Magento , etc)?
If not, you could provide us with the url of yours site, unless this creates a problem (but it would allow us to identify which program you are using)
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Search Engine Optimization (SEO)

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.