Jump to content

craigj1303

Members
  • Posts

    12
  • Joined

  • Last visited

Profile Information

  • Gender
    Not Telling

craigj1303's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Hi Requinix, thanks for your reply. Yes, you are correct, perhaps I phrased it incorrectly. Your comment: That is exactly what I want to do for SEO purposes. What line(s) of code would I need to add to my existing code to make requests for the old URL redirect to the new URL using 301 redirect? I am aware of the Redirect 301 rule but need to understand if that is the correct way to go about it with maybe adding some form of regex?
  2. Hi There I've been working on creating search engine friendly URLS from query strings. I have written some rules using mod_rewrite and the rules are working well and re-directing query string URL's to my new friendly URL's. However, I seem to have a problem when introducing the [R=301] flag. This code gives me my Search Engine friendly URL in the address bar: RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_URI} !=/favicon.ico RewriteCond %{REQUEST_URI} ^/ranges/ RewriteRule ^([-a-zA-Z_0-9]+)/([a-zA-Z_0-9]+)$ /index.php?page=show_range&range_id=$2 [QSA,L] But after I enter the R=301 flag this code gives displays the full index string URL: RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_URI} !=/favicon.ico RewriteCond %{REQUEST_URI} ^/ranges/ RewriteRule ^([-a-zA-Z_0-9]+)/([a-zA-Z_0-9]+)$ /index.php?page=show_range&range_id=$2 [R=301,QSA,L] I am told that R=301 should be implemented to let Google know that the page has moved. What is going wrong?
  3. Hi, thanks for the advice. Before I go and experiment with that, I have been informed I need to do 301 redirects so not only do the URL's look more frindly, but Google will be aware that they have moved permanently. How do I build that in to the equation?
  4. Hi There I designed a database driven site some years ago using PHP and HTML. All the site pages are routed through index.php and the content of those pages is determined by the query string in the URL which then triggers PHP includes. I am now at a stage where we have a SEO company who has advised us to make our URL's "SEO friendly". They advise that the best way to do this is using 301 redirects and using the mod_rewrite feature on the Apache Server. I have no experience whatsover with this. What is the best way to go about this? I have googled mod_rewrite etc. but there is so much information I don't know what the best way to proceed is. Below is an example of what I want to achieve across the site: Existing URL: http://www.mycompany.co.uk/index.php?page=show_range&range_id=39 Proposed URL: http://www.mycompany.co.uk/ranges/balmoral If anyone can offer any advice for best practice I would most appreciate, or even a link to a good tutorial that would be great! Thanks in advance, Craig
  5. Hi All I developed a site using PHP & a MYSQL database. From the off I structured the site by routing everything through index.php. This way the page shell (banner, navigation etc) is always consistent and I use includes for the various page contents. This has been fine up until now. But now I am designing in a new aspect to the site which requires a user to login to view some content. Now, the problem is that I want to check if the user has logged in before certain content is displayed, and I have a confirm_login() function that checks if a $_session variable has been set for login. If the login $_Session variable hasn't been set the user is diverted to the login page. But this confirm_login() function requires me to check for a user login on every page and I only need the user to be logged in for a few secure pages. But as everything is routed through index.php how can I best handle this? Regards Craig
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.