php - REALLY basic mod_rewrite question -


I am trying to use a SEO friendly URL for a website. Website displays information in hierarchical way For example, if my website was about cars then I would like to url to show all Ford models stored in the 'My' cars table. Then the URL will show all Ford Explorer models (V-6, V-8, Premium, etc.).

For the question now: Is mod_rewrite used to write a query string-style url in a semantic URL, or on the other side? In other words, when I use javascript to set the window.location = $ URL , the URL should be a string string version of "or I will use internally" Should the query string access the variable?

Hopefully, anyone can see my confusion with this issue, what is the cost of it, I have created all my top tier categories (especially, not about site cars) 'Slug' is there.


Thanks for all help so far. I'm getting rewrite work but this site (CSS, JavaScript, images) is affecting other paths. I am using the correct path structure for all of these (i.e. '/images/car.png' and '/css/main.css'). Do I have to use a full path ('') for all the files? Thanks!

Generally, people who use mod_rewrite, use such terminology :

I want to re-write a mod_rewrite b.

This means that any requests from the external world for page A are rewritten in the B file on the server.

You want

a) http://example.com/ford/explorer

but your web server wants To see them like

b) http://example.com/page.php?type=ford&model=explorer

I will say That you want to re-type (A) look like (B), or you want to rewrite the semantic URL in a query string url.

Since all the links on your page are clicked by the user and / or requested by the browser, you want to see them as (A). It contains links that are used in javascript window.location. They should look like and (A).


Comments

Popular posts from this blog

asp.net - Javascript/DOM Why is does my form not support submit()? -

sockets - Delphi: TTcpServer, connection reset when reading -

javascript - Classic ASP "ExecuteGlobal" statement acting differently on two servers -