htaccess issue with seo friendly urls - GoDaddy

0 votes

Here's what I've written in my htaccess file:

RewriteEngine On
RewriteRule ^category/([a-zA-Z0-9]+)$ category.php?location=$1

So the idea is to change mysite.com/category.php?location=londonto mysite.com/category/london.

Initially I though it may be an issue with the ability to mod rewrite being switched on on GoDaddy's end, so I contacted GoDaddy to see if it that was the case and their response was that: "Mod_rewrite is an Apache Web server module installed on all of our Linux servers by default; it does not have to be installed or enabled. Our Linux hosting accounts support most mod_rewrite functions. Because enabling mod_rewrite is handled at a global level, you do not need to enable it in your httpd.conf file. You only need to add the desired code to the body of your .htaccess file."

And they bascially implied that the error is not with them and with my code. I'm not very experienced with mod rewrites and it seemed to work fine when I wrote it like this on other servers. Is there something special you have to write with godaddy? Am I missing something?

Feb 27, 2022 in Others by Kichu
• 19,050 points
990 views

1 answer to this question.

0 votes
<IfModule mod_rewrite.c>
  RewriteEngine on
  RewriteBase /

  RewriteRule ^category/([a-zA-Z0-9_-]+)$ category.php?location=$1 [L]
</IfModule>
add this if statement as default 
answered Feb 28, 2022 by narikkadan
• 63,720 points

Related Questions In Others

+2 votes
2 answers

Is Reactjs SEO friendly? with google bots

Yes, with SERVER-SIDE RENDERING you will not face ...READ MORE

answered Feb 10, 2022 in Others by Shreesh
• 160 points
2,741 views
0 votes
1 answer

Googlebot is accessing .aspx pages, it should access SEO-friendly URLs only

google bot will find  it if you ...READ MORE

answered Feb 11, 2022 in Others by narikkadan
• 63,720 points
437 views
0 votes
1 answer

nginx clean url with seo friendly file names

server {     listen 80;     server_name example.com;     root   /full/server/path/to/your/cms;     index  index.php;     location / ...READ MORE

answered Feb 14, 2022 in Others by narikkadan
• 63,720 points
930 views
0 votes
1 answer

Generate SEO friendly URLs (slugs)

function format_uri( $string, $separator = '-' ) {     $accents_regex ...READ MORE

answered Feb 14, 2022 in Others by narikkadan
• 63,720 points
558 views
0 votes
0 answers

SEO friendly url using php

I wanted to use php to make ...READ MORE

Feb 18, 2022 in Others by Kichu
• 19,050 points
917 views
0 votes
1 answer

How can I create custom SEO-friendly URLs in OpenCart?

Index: catalog/controller/common/seo_url.php =================================================================== --- catalog/controller/common/seo_url.php (old) +++ catalog/controller/common/seo_url.php ...READ MORE

answered Feb 21, 2022 in Others by narikkadan
• 63,720 points
963 views
0 votes
1 answer

How to use $_GET parameter to make seo friendly urls?

What you can do is the following RewriteEngine ...READ MORE

answered Feb 27, 2022 in Others by narikkadan
• 63,720 points
6,125 views
0 votes
1 answer

AngularJS & Google Data Highlighter

https://support.google.com/webmasters/answer/2692911?hl=en just go through this and you ...READ MORE

answered Mar 1, 2022 in Digital Marketing by narikkadan
• 63,720 points
831 views
0 votes
1 answer

Generator URL Friendly SEO PHP with .htaccess

Options +FollowSymLinks -MultiViews RewriteEngine on RewriteBase / # skip all ...READ MORE

answered Feb 14, 2022 in Others by narikkadan
• 63,720 points
4,406 views
0 votes
1 answer

Creating SEO friendly urls using htaccess

its just a simple step just use ...READ MORE

answered Feb 20, 2022 in Others by narikkadan
• 63,720 points
592 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP