SEO URL Rewriting Using .htaccess
This is my dynamic URL
I placed the below text in my .htaccess file in my root directory
pointed my links to
RewriteRule limousines/(.*)/(.*)/$ /limousines.php?$1=$2
and got the base limousines.php page with all styles and graphic removed (I am assuming this is because the page was looking for the stylesheet in the wrong directory).
How do I do the URL rewriting stuff the right way? I'm brand new to it and at a total loss.
I've switched careers...
I'm NO LONGER a scientist,
but now a web developer...
I think there are two problems, the first is that a dot (.) will match everything, including / so perhaps replace it with something like [a-z0-9] which will mathc any lowercase letter or number.
The second possible problem is that a * will match zero or more times, so it will match if there is nothing specified, e.g. limousines/// so maybe replace it with a + which will match one or more times.
Is there any link/tutorial on how to create MOD-REWRITE urls using PHP.
I have used copy-paste htaaccess from tutorial websites , but I am really keen to understand how to write my own customized MOD-REWRITE rules.
There's a great beginners' guide here:
And a cheat sheet here:
The yourhtmlsource.com guide is really great and should be everything you need.
in addition on SlappyTheFish 's post, it is necessary to add BASE HREF in the head of your html pages, so browser will know which is the base directory of the site and properly fetch css, images, etc.
Originally Posted by aj_nsc
Take a look on news website http://www.livepage.info where we have the same thing.
eg. of the code: <html><head><base href="http://www.domain.com/">...
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)